1,105,581 Community Members

Help Please !!

Member Avatar
seemsbeautiful
Newbie Poster
1 post since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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 !!

Member Avatar
nquinlan
Newbie Poster
18 posts since Mar 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
scaiferw
Junior Poster
119 posts since May 2010
Reputation Points: 15 [?]
Q&As Helped to Solve: 8 [?]
Skill Endorsements: 0 [?]
 
0
 

I don't want to discourage you, but what you're asking is far more involved than any forum post can cover.

You can't even begin to think about creating a login system and a shopping card system youself until you've become very comfortable with basic to intermediate PHP and MySQL.

You might find that a website based on Joomla or Drupal would be more suitable for you. You'll find the login system is included and there are many extensions available for things like shopping carts.

Member Avatar
seanjosh
Newbie Poster
1 post since Nov 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Thanks for all yea .. I have tried Joomla and ok, i will learn more ..

About devshed.com :

function &db_connect() {
require_once 'DB.php';
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$db_host = 'localhost';
$db_user = 'shaggy';
$db_pass = 'password';
$db_name = 'shaggy';
$dsn = "mysql://$db_user:$db_pass@unix+$db_host/$db_name";
$db = DB::connect($dsn);
$db->setFetchMode(DB_FETCHMODE_OBJECT);
return $db;
}

1) Is this the code i have to put on php files ?

2)
$db_user = 'shaggy';
$db_pass = 'password';
Where i can find the user and password on my xampp ?? Thx ..

Member Avatar
scaiferw
Junior Poster
119 posts since May 2010
Reputation Points: 15 [?]
Q&As Helped to Solve: 8 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

http://veerasundar.com/blog/2009/01/how-to-change-the-root-password-for-mysql-in-xampp/
http://robsnotebook.com/xampp-remove-default-users-passwords

(By the way, when you're asking for help here, be sure to note what operation system and version you're running on your server.)

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: