deadlypanther Posted August 3, 2008 Share Posted August 3, 2008 Right,I'l introduce myself at the same time,im William,i work with ababmxking on www.racing-generation.com Anyway lately i've been having a problem,i made a partshop for the game,and for the first 2 months its worked fine,we never edited anything about it,then we changed host cause the hosting company got bought... and suddently the error Fatal error: Cannot access empty property in /home/racingg/public_html/partshop.php on line 98 This is from require.php : $carid = $info2['carid']; Needed information for the line stated in partshop.php : if ( $_POST['select1'] != 'none' ) { $ptype = "engine"; $lvl = $_POST['select1']; } $typget = mysql_query("SELECT * FROM cars WHERE id='$carid'"); $typfet = mysql_fetch_object($typget); $ttype = $typfet->$ptype; $type1 = $ttype + 1; if ($typfet->$type <= $lvl ) { echo"<center>Your $ptype is either too low or high to be upgraded with this level ($ptype LV$lvl )</center>"; $error = "yes"; } can anyone help? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 3, 2008 Share Posted August 3, 2008 Where is line 98? The error Cannot access empty property usually means PHP is trying to use a property from an object which doesn't exist. Quote Link to comment Share on other sites More sharing options...
deadlypanther Posted August 4, 2008 Author Share Posted August 4, 2008 if ($typfet->$type <= $lvl ) { echo"<center>Your $ptype is either too low or high to be upgraded with this level ($ptype LV$lvl )</center>"; $error = "yes"; } 98 99 100 Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 4, 2008 Share Posted August 4, 2008 The $type variable doesn't exist in the code you provided. There is a variable called $type1 though. Quote Link to comment Share on other sites More sharing options...
deadlypanther Posted August 4, 2008 Author Share Posted August 4, 2008 Problem solved,thanks it was the $type1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.