| | |
Php Mysql Shopping Cart
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2006
Posts: 25
Reputation:
Solved Threads: 0
Could some please help me. I am following a tutorial from "http://www.devarticles.com/c/a/MySQL/Building-A-Persistent-Shopping-Cart-With-PHP-and-MySQL/2/"
I keep getting a "
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\cart1\products.php on line 59"
My db connection is fine but I am trying bring a result from the diagram shown in the url. Please help. This is what I have put in my code from the site the products page.
I keep getting a "
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\cart1\products.php on line 59"
My db connection is fine but I am trying bring a result from the diagram shown in the url. Please help. This is what I have put in my code from the site the products page.
PHP Syntax (Toggle Plain Text)
<?php // This page will list all of the items // from the items table. Each item will have // a link to add it to the cart include("db.php"); // Get a connection to the database $cxn = @ConnectToDb($dbServer, $dbUser, $dbPass, $dbName); $result = mysql_query("select * from items order by itemName asc"); ?> <?php while($row = mysql_fetch_array($result)) { ?> <html> <head> <title>Products</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table> <tr> <td width="30%" height="25"> <font face="verdana" size="1" color="black"> <?php echo $row["itemName"]; ?> </font> </td> <td width="10%" height="25"> <font face="verdana" size="1" color="black"> <?php echo $row["itemPrice"]; ?> </font> </td> <td width="50%" height="25"> <font face="verdana" size="1" color="black"> <?php echo $row["itemDesc"]; ?> </font> </td> <td width="10%" height="25"> <font face="verdana" size="1" color="black"> <a href="cart.php?action=add_item&id=<?php echo $row["itemId"]; ?>&qty=1">Add Item</a> </font> </td> </tr> <tr> <td width="100%" colspan="4"> <hr size="1" color="red" NOSHADE> </td> </tr> <tr> <td width="100%" colspan="4"> <font face="verdana" size="1" color="black"> <a href="cart.php">Your Shopping Cart >></a> </font> </td> </tr> </table> </body> </html>
•
•
Join Date: Nov 2007
Posts: 121
Reputation:
Solved Threads: 16
It depends on which database your using (mysql, mssql etc) www.php.net and search mysql
![]() |
Similar Threads
- PHP and MySQL Web Development (PHP)
- [For Hire] Php, Mysql, ASP, AJAX, DHTML programmer (Post your Resume)
- Simple Shopping Cart with arrays (PHP)
- shopping cart help (PHP)
- [for hire] PHP/MySQL developer (Post your Resume)
- 5 Years Experiance In the PHP+MYSQL language and DB (Post your Resume)
Other Threads in the PHP Forum
- Previous Thread: Want to pass a string through URL...
- Next Thread: Need help urgently ..........
| Thread Tools | Search this Thread |
.htaccess ajax apache api array back basic beginner binary broken cakephp checkbox class cms code computing cron curl customizableitems database date delete display dynamic echo email error file files filter folder form forms function functions gc_maxlifetime google host href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm mod_rewrite multiple mysql navigation oop parsing paypal pdf php problem query radio random recursion regex remote script search server sessions sms snippet soap source space sql syntax system table thesishelp trouble tutorial update upload url validation validator variable video web xml youtube





