Hello :D i'm new here .. I'm 15 years old and wanna learn for making online shopping website which including like make user database with mysql and make shopping cart . I already installed XAMPP on my comp . But i don't know how to make login form in my web .. Wonder if anyone can help me to create form database for user and make shopping cart with buy button .. Thanks yea !!
Hi. If you want to make a shopping website, I highly recommend looking into a Content Management System or CMS as the in's and out's of ecommerce can get quite complex. If you are determined, however, I recommend checking out this page. It's good to learn how to make a login and the like but as I said tackling ecommerce is hard.
Here is a much more straightforward way to connect to your database:
// connect to database server
$dbserver = "localhost";
$username = "username";
$password = "password";
$connect = mysql_connect ("$dbserver", "$username", "$password")
or die ('<br />I cannot connect to the database because: ' . mysql_error());
// select the database
mysql_select_db ("database_name") or die('<br />I could not select database: '.mysql_error());
Localhost is probably the correct value for $dbserver.
As installed, there will only be one account, the 'root' account for MySQL. This should only be used for administration - it is extremely powerful and should not be used by a website to access the database. Set up a more restricted account for your web applications (websites) to use.
From what I can see in Google, there is no root password for MySQL on XAMPP as installed. See the links below. You should ensure that a password is set for this right away.