|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi,
I'm new to php and mysql and am having problems using the shopping cart script.I have got the products.php to work but get an error when I try to add an item or display the shopping cart. The error I'm getting is Parse error: parse error, expecting `'{'' in xxx/www/cart.php on line 29 Here is my cart.php script: PHP Code:
Would really appreciate any help Thanks Jude |
|
#2
|
||||
|
||||
|
Which line is 29?
|
|
#3
|
|||
|
|||
|
Line 29
Think line 29 is this:
PHP Code:
Thanks Jude |
|
#4
|
|||
|
|||
|
Hey Jude,
I'm not sure if maybe the forum software stripped them out (can't see why it would), but you don't have any opening or closing { } for your functions. You seem to have an awful lot for your switch/case statement (I don't think you need braces for your case statements... As long as you end the case with a "break" statement, you don't need them. As for the error message, try adding { } around your functions, and that should resolve the issue. HTH!
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#5
|
|||
|
|||
|
Thanks Frank, tried that & am now getting
Parse error: parse error, expecting `';'' in xxx/www/cart.php on line 68 This is line 68: PHP Code:
This code was all taken direct from the shopping cart tutorial, has anyone got a fully working version of this? Would also like any code I could add (assuming I get this working !) to enable the full cart, i.e. checkout, customer info, selecting payment type, shipping method & then sending details to PayPal. Thanks again Jude |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Shopping cart parse error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|