Canadiengland Posted March 18, 2007 Share Posted March 18, 2007 this isnt working... when i click on it from the url equip.php?itemid=20 it just keeps saying "unable to create item." am i missing something really obvious here? gawd! if you can edit the code so it works thatd be great, or if you can just point out what im doing wrong that would also be super. thanks guys. <?php include "connect.php"; $itemid = $_GET['itemid']; if (isset($_SESSION['player'])) { $player=$_SESSION['player']; $userstats="SELECT * from km_users where playername='$player'"; $userstats2=mysql_query($userstats) or die("Could not get user stats"); $userstats3=mysql_fetch_array($userstats2); $equip="SELECT * from km_items where owner='$player' and status='u'"; $equip2=mysql_query($equip) or die("Could not get user stats"); $equip3=mysql_fetch_array($equip2); mysql_query("UPDATE km_items SET status='e' WHERE id='$itemid'"); print "You equipped the $equip3[name]. (<a href=equip.php>refresh</a>)"; } else { print "Unable to equip item."; } ?>code] Link to comment https://forums.phpfreaks.com/topic/43213-solved-gonna-rip-my-hair-out/ Share on other sites More sharing options...
jokur Posted March 18, 2007 Share Posted March 18, 2007 Do you have session_start() at the beginning of the script? Link to comment https://forums.phpfreaks.com/topic/43213-solved-gonna-rip-my-hair-out/#findComment-209812 Share on other sites More sharing options...
Canadiengland Posted March 18, 2007 Author Share Posted March 18, 2007 ahaha yeah deringer from the chat just pointed that out too... KNEW it was something stupid! all situations avoided now fellas! Link to comment https://forums.phpfreaks.com/topic/43213-solved-gonna-rip-my-hair-out/#findComment-209814 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.