Shop Make Over

Posted on Sunday 3rd February 2008 at 07:00 PM
MrArmstrong
MrArmstrong's Avatar
Theres Errors in the shop i posted them on the comments
Posted on Sunday 3rd February 2008 at 07:53 PM
Diablosblizz
Diablosblizz's Avatar
1. For the shop_admin.php:

Find:

Code
/check if admin


Replace with:

Code
//check if admin


Just forgot one of the /'s to make it a comment. As for the other error on line 132 on shop.php:

Replace:

Code
$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username']' AND `name` = '$item[name]';"); //update it ;)


With:

Code
$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username]' AND `name` = '$item[name]'"); //update it ;)


Errors should be fixed.
Posted on Sunday 3rd February 2008 at 08:03 PM
DanielXP
DanielXP's Avatar
Tutorial updated, Work now?
Posted on Sunday 3rd February 2008 at 08:36 PM
ShadowMage
ShadowMage's Avatar
Code
$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username']' AND `name` = '$item[name]';"); //update it ;)

Works fine. It doesn't matter if you have a ; after the main things or not i do it just because i'm used to it and such things.
failure i sense
Posted on Wednesday 6th February 2008 at 09:54 PM
Diablosblizz
Diablosblizz's Avatar
Look at the code:

Code
$update = mysql_query("UPDATE `user_shop_items` SET `quantity` = '$new_quantity' WHERE `owner` = '$logged[username']' AND `name` = '$item[name]';"); //update it ;)


If you really look hard enough:

Code
'$logged[username']'


You have a ' in the username, so I fixed that and the ;, weather it matters or not.
Posted on Thursday 7th February 2008 at 08:23 PM
MrArmstrong
MrArmstrong's Avatar
Thank You Very Much Ive Now Got it Fixeed :)
Posted on Saturday 9th February 2008 at 04:14 PM
Diablosblizz
Diablosblizz's Avatar
Your welcome.
Topic is locked