i3lack Posted July 12, 2008 Share Posted July 12, 2008 Here the thing i keep getting this error can anyone help me fix! i tried fixing the problem but nothing.. Parse error: syntax error, unexpected $end in /home/grandma/public_html/functions.php on line 300 <? session_start(); include_once "uncludes/db_connect.php"; $username=$_SESSION['username']; echo "<link rel=stylesheet href=includes/in.css type=text/css>"; ?> <link rel=stylesheet href=includes/in.css type=text/css> <link rel=stylesheet href=in.css type=text/css> <? $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $don=mysql_num_rows(mysql_query("SELECT * FROM donaters WHERE username='$username'")); $date = gmdate('Y-m-d h:i:s'); if ($info->health <= "0"){ mysql_query("UPDATE users SET status='Dead' WHERE username='$username'"); session_destroy(); } if ($info->status == "Dead"){ session_destroy(); echo "You're Dead!"; include("killed.php"); exit(); } if ($info->status == "Banned"){ session_destroy(); echo "You Have Been Banned"; include("banned.php"); exit(); } $crew_check =mysql_query("SELECT * FROM crews"); while($k = mysql_fetch_object($crew_check)){ $user=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$k->owner'")); $rhm=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$k->rhm'")); if ($user->status == "Dead" || $user->status == "Banned"){ if ($k->rhm != "0" && $rhm->status == "Alive"){ mysql_query("UPDATE crews SET owner='$k->rhm', rhm='0' WHERE name='$k->name'"); } elseif ($k->rhm == "0" || $rhm->status == "Dead" || $rhm->status == "Banned"){ mysql_query("UPDATE `users` SET `crew`='0' WHERE `crew`='$k->name'"); mysql_query("DELETE FROM crews WHERE name='$k->name'"); } } } $bba=mysql_query("SELECT * FROM bank"); while($nana =mysql_fetch_object($bba)){ $ppl=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$nana->owner'")); if ($ppl->status == "Dead" || $ppl->status == "Banned"){ mysql_query("UPDATE bank SET owner='0' WHERE id='$nana->id'"); } } $oc_query=mysql_query("SELECT * FROM oc"); while($ttfn = mysql_fetch_object($oc_query)){ $user_oc=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$ttfn->leader'")); if ($user_oc->status == "Dead" || $user_oc->status == "Banned"){ mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->we'"); mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->ee'"); mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->driver'"); mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->leader'"); mysql_query("DELETE FROM oc WHERE id='$ttfn->id'"); }} function logincheck(){ if (empty($_SESSION['username'])){ echo " <SCRIPT LANGUAGE='JavaScript'> window.location='index.php'; </script> "; exit(); ////UPDATE ONLINE $time = time() + (60 * 10); mysql_query("UPDATE users SET online='$time' WHERE username='$username'"); ///FINSH UPDATING ONLINE function makecomma($input) { if(strlen($input)<=3) { return $input; } $length=substr($input,0,strlen($input)-3); $formatted_input = makecomma($length).",".substr($input,-3); return $formatted_input; } /////////NOW TO THE BB CODES ETC.... function rankcheck(){ $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $date = gmdate('Y-m-d h:i:s'); if ($info->rank == "Tramp" && $info->rankpoints >= "350"){ $newrank="Thief"; $done="1"; } elseif ($info->rank == "Thief" && $info->rankpoints >= "750"){ $newrank="Hooligan"; $done="1"; } elseif ($info->rank == "Hooligan" && $info->rankpoints >= "2320"){ $newrank="Criminal"; $done="1"; } elseif ($info->rank == "Criminal" && $info->rankpoints >= "4000"){ $newrank="Gangster"; $done="1"; } elseif ($info->rank == "Gangster" && $info->rankpoints >= "6000"){ $newrank="Boss"; $done="1"; } elseif ($info->rank == "Boss" && $info->rankpoints >= "7200"){ $newrank="Supreme Boss"; $done="1"; } elseif ($info->rank == "Supreme Boss" && $info->rankpoints >= "11500"){ $newrank="Don"; $done="1"; } elseif ($info->rank == "Don" && $info->rankpoints >= "17500"){ $newrank="Legendary Don"; $done="1"; } elseif ($info->rank == "Legendary Don" && $info->rankpoints >= "150000"){ $newrank="Legendary Don"; $done="0"; } if (!$done){ $done="0"; } if ($done == "1"){ mysql_query("UPDATE users SET rank='$newrank' WHERE username='$username'"); mysql_query("INSERT INTO `inbox` ( `id` , `to` , `from` , `message` , `date` , `read` , `saved` , `event_id` ) VALUES ( '', '$username', '$username', 'You have been promoted to $newrank your doing well!', '$date', '0', '0', '0' )"); }} rankcheck(); ///////HOUSTON WE HAVE JAIL CHECK! $jail_check=mysql_query("SELECT * FROM jail"); while($monster=mysql_fetch_object($jail_check)){ if (time() > $monster->time_left){ mysql_query("DELETE FROM jail WHERE username='$monster->username'"); }} function maketime($last){ $timenow = time(); if($last>$timenow){ $order = $last-$timenow; while($order >= 60){ $order = $order-60; $ordermleft++; } while($ordermleft >= 60){ $ordermleft = $ordermleft-60; $orderhleft++; } if($ordermleft == 0){ $ordermleft = ""; } else { $ordermleft = "$ordermleft Minutes"; } if($orderhleft == 0){ $orderhleft = ""; } else { $orderhleft = "$orderhleft Hours"; } return "$orderhleft $ordermleft $order Seconds"; }} function loose_energy(){ $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $energy=$info->energy - rand(1,3); if ($energy <= "0"){ $update=health; $thing=$info->health - rand(1,3); $energy_new="0"; }elseif ($energy > "0"){ $update=energy; $thing=$info->energy - rand(1,3); } if (!$energy_new){ mysql_query("UPDATE users SET $update='$thing' WHERE username='$username'"); }elseif ($energy_new){ mysql_query("UPDATE users SET $update='$thing', energy='0' WHERE username='$username'"); } } $most_online=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $timenow=time(); $now_online =mysql_num_rows(mysql_query("SELECT * FROM users WHERE online > '$timenow'")); if ($now_online > $most_online->online){ mysql_query("UPDATE site_stats SET online='$now_online' WHERE id='1'"); } $drop =mysql_query("SELECT * FROM casinos"); while($tard=mysql_fetch_object($drop)){ $per = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard->owner'")); if ($per->status == "Dead" || $per->status == "Banned"){ mysql_query("UPDATE casinos SET owner='0' WHERE casino='$tard->casino' AND owner='$tard->owner'"); } } $drop_bar =mysql_query("SELECT * FROM bar"); while($tard_bar=mysql_fetch_object($drop_bar)){ $per_bar = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_bar->owner'")); if ($per_bar->status == "Dead" || $per_bar->status == "Banned"){ mysql_query("UPDATE bar SET owner='0' WHERE owner='$tard_bar->owner'"); } } $drop_bf =mysql_query("SELECT * FROM bf"); while($tard_bf=mysql_fetch_object($drop_bf)){ $per_bf = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_bf->owner'")); if ($per_bf->status == "Dead" || $per_bf->status == "Banned"){ mysql_query("UPDATE bf SET owner='0' WHERE owner='$tard_bf->owner'"); } } if ($info->banktime <= time() && $info->bank > "0"){ $nmoney = 10 * $info->bank / 100; $money_in = $info->bank + $nmoney; $money_in= round($money_in); $recieve = $info->money + $money_in; mysql_query("UPDATE users SET money = '$recieve', bank='0', banktime='0' WHERE username='$username'"); } $drop_und =mysql_query("SELECT * FROM shop"); while($tard_und=mysql_fetch_object($drop_und)){ $per_und = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_und->owner'")); if ($per_und->status == "Dead" || $per_und->status == "Banned"){ mysql_query("UPDATE shop SET owner='0' WHERE owner='$tard_und->owner'"); } } $user_info=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($user_info->jail_able == "1" && $user_info->jail_untill <= time()){ mysql_query("UPDATE user_info SET jail_able='0' WHERE username='$username'"); } $user_shit=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($user_shit->last_respect < time() && $fetch->rank != "Tramp"){ if ($info->rank == "Paper Kid"){ $new_res="1"; }elseif($info->rank == "Thief"){ $new_res="2"; }elseif($info->rank == "Hooligan"){ $new_res="3"; }elseif($info->rank == "Criminal"){ $new_res="4"; }elseif($info->rank == "Gangster"){ $new_res="5"; }elseif($info->rank == "Boss"){ $new_res="6"; }elseif($info->rank == "Supreme Boss"){ $new_res="7"; }elseif($info->rank == "Don"){ $new_res="8"; }elseif($info->rank == "Legendry Don"){ $new_res="9"; }elseif($info->rank == "Head Moderator"){ $new_res="10"; }elseif($info->rank == "Moderator"){ $new_res="11"; }elseif($info->rank == "Admin"){ $new_res="12"; }elseif($info->rank == "MadeMan"){ $new_res="13"; }elseif($info->rank == "General"){ $new_res="14"; }elseif($info->rank == "Capo"){ $new_res="15"; }elseif($info->rank == "WarMaster"){ $new_res="16"; }elseif($info->rank == "Boss"){ $new_res="17"; }elseif($info->rank == "Godfather"){ $new_res="18"; }elseif($info->rank == "Don"){ $new_res="19"; }elseif($info->rank == "Boss of Bosses"){ $new_res="20"; }elseif($info->rank == "Mob Boss"){ $new_res="21"; }elseif($info->rank == "WarGod"){ $new_res="22"; }elseif($info->rank == "Slayer"){ $new_res="23"; }elseif($info->rank == "Messiah"){ $new_res="24"; }elseif($info->rank == "SupremeBeing"){ $new_res="25"; }elseif($info->rank == "God"){ $now=time() + (3600 * 24 * 7); mysql_query("UPDATE user_info SET respect='$new_res', last_respect='$now' WHERE username='$username'"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/ Share on other sites More sharing options...
himegoto Posted July 12, 2008 Share Posted July 12, 2008 put curly braces around your variables like {$username} because php thinks you want the variable $username' included in your mysql statement. This comes up several times. For example: $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); should be // note the curly braces $query=mysql_query("SELECT * FROM users WHERE username='{$username}' LIMIT 1"); // concatenating the string works too. $query=mysql_query("SELECT * FROM users WHERE username='" . $username. "' LIMIT 1"); you also spelled "includes" as "uncludes" in your first include_once statement. Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-588488 Share on other sites More sharing options...
i3lack Posted July 12, 2008 Author Share Posted July 12, 2008 fixed that, but how do i fix the problem i have there ?? Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-588492 Share on other sites More sharing options...
fenway Posted July 14, 2008 Share Posted July 14, 2008 fixed that, but how do i fix the problem i have there ?? Which one? Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-589750 Share on other sites More sharing options...
PFMaBiSmAd Posted July 15, 2008 Share Posted July 15, 2008 The unexpected $end error is because the php parser reached the end of your file while it was still expecting php code. This is caused by open language elements in your code. This is normally due to mismatched {}, but it can also be caused by things like mismatched quotes. The fix is for you to proofread through your code and make sure that there are matching opening and closing elements. Your code is not formatted using consistent indentation to show which lines belong together at the same level and to line up matching {}. Doing so would make it easier to find problems like this. Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-590412 Share on other sites More sharing options...
willyamPax Posted July 16, 2008 Share Posted July 16, 2008 here i edit ur code to make the pares of {} to be exact but im not sure i put them right but i manage to complete all the lacking {} i put some comments on the {} that i put PFMaBiSmAd is right about matching opening and closing elements of {}.. hope this will help u <? session_start(); include_once "uncludes/db_connect.php"; $username=$_SESSION['username']; echo "<link rel=stylesheet href=includes/in.css type=text/css>"; ?> <link rel=stylesheet href=includes/in.css type=text/css> <link rel=stylesheet href=in.css type=text/css> <? $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $don=mysql_num_rows(mysql_query("SELECT * FROM donaters WHERE username='$username'")); $date = gmdate('Y-m-d h:i:s'); if ($info->health <= "0"){ mysql_query("UPDATE users SET status='Dead' WHERE username='$username'"); session_destroy(); } if ($info->status == "Dead"){ session_destroy(); echo "You're Dead!"; include("killed.php"); exit(); } if ($info->status == "Banned"){ session_destroy(); echo "You Have Been Banned"; include("banned.php"); exit(); } $crew_check =mysql_query("SELECT * FROM crews"); while($k = mysql_fetch_object($crew_check)){ $user=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$k->owner'")); $rhm=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$k->rhm'")); if ($user->status == "Dead" || $user->status == "Banned"){ if ($k->rhm != "0" && $rhm->status == "Alive"){ mysql_query("UPDATE crews SET owner='$k->rhm', rhm='0' WHERE name='$k->name'"); } elseif ($k->rhm == "0" || $rhm->status == "Dead" || $rhm->status == "Banned"){ mysql_query("UPDATE `users` SET `crew`='0' WHERE `crew`='$k->name'"); mysql_query("DELETE FROM crews WHERE name='$k->name'"); } } } $bba=mysql_query("SELECT * FROM bank"); while($nana =mysql_fetch_object($bba)){ $ppl=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$nana->owner'")); if ($ppl->status == "Dead" || $ppl->status == "Banned"){ mysql_query("UPDATE bank SET owner='0' WHERE id='$nana->id'"); } } $oc_query=mysql_query("SELECT * FROM oc"); while($ttfn = mysql_fetch_object($oc_query)){ $user_oc=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$ttfn->leader'")); if ($user_oc->status == "Dead" || $user_oc->status == "Banned"){ mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->we'"); mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->ee'"); mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->driver'"); mysql_query("UPDATE users SET oc='0' WHERE username='$ttfn->leader'"); mysql_query("DELETE FROM oc WHERE id='$ttfn->id'"); } } function logincheck(){//not sure about this i just put } to match coz seems that there is no end } and also the if if (empty($_SESSION['username'])){ echo " <SCRIPT LANGUAGE='JavaScript'> window.location='index.php'; </script> "; exit(); }//i added this one..hoping i place it right ////UPDATE ONLINE $time = time() + (60 * 10); mysql_query("UPDATE users SET online='$time' WHERE username='$username'"); ///FINSH UPDATING ONLINE }//i added this one if not just edit function makecomma($input) { if(strlen($input)<=3) { return $input; } $length=substr($input,0,strlen($input)-3); $formatted_input = makecomma($length).",".substr($input,-3); return $formatted_input; } /////////NOW TO THE BB CODES ETC.... function rankcheck(){ $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $date = gmdate('Y-m-d h:i:s'); if ($info->rank == "Tramp" && $info->rankpoints >= "350"){ $newrank="Thief"; $done="1"; } elseif ($info->rank == "Thief" && $info->rankpoints >= "750"){ $newrank="Hooligan"; $done="1"; } elseif ($info->rank == "Hooligan" && $info->rankpoints >= "2320"){ $newrank="Criminal"; $done="1"; } elseif ($info->rank == "Criminal" && $info->rankpoints >= "4000"){ $newrank="Gangster"; $done="1"; } elseif ($info->rank == "Gangster" && $info->rankpoints >= "6000"){ $newrank="Boss"; $done="1"; } elseif ($info->rank == "Boss" && $info->rankpoints >= "7200"){ $newrank="Supreme Boss"; $done="1"; } elseif ($info->rank == "Supreme Boss" && $info->rankpoints >= "11500"){ $newrank="Don"; $done="1"; } elseif ($info->rank == "Don" && $info->rankpoints >= "17500"){ $newrank="Legendary Don"; $done="1"; } elseif ($info->rank == "Legendary Don" && $info->rankpoints >= "150000"){ $newrank="Legendary Don"; $done="0"; } if (!$done){ $done="0"; } if ($done == "1"){ mysql_query("UPDATE users SET rank='$newrank' WHERE username='$username'"); mysql_query("INSERT INTO `inbox` ( `id` , `to` , `from` , `message` , `date` , `read` , `saved` , `event_id` ) VALUES ( '', '$username', '$username', 'You have been promoted to $newrank your doing well!', '$date', '0', '0', '0' )"); } } rankcheck(); ///////HOUSTON WE HAVE JAIL CHECK! $jail_check=mysql_query("SELECT * FROM jail"); while($monster=mysql_fetch_object($jail_check)){ if (time() > $monster->time_left){ mysql_query("DELETE FROM jail WHERE username='$monster->username'"); } } function maketime($last){ $timenow = time(); if($last>$timenow){ $order = $last-$timenow; while($order >= 60){ $order = $order-60; $ordermleft++; } while($ordermleft >= 60){ $ordermleft = $ordermleft-60; $orderhleft++; } if($ordermleft == 0){ $ordermleft = ""; } else { $ordermleft = "$ordermleft Minutes"; } if($orderhleft == 0){ $orderhleft = ""; } else { $orderhleft = "$orderhleft Hours"; } return "$orderhleft $ordermleft $order Seconds"; } } function loose_energy(){ $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1"); $info = mysql_fetch_object($query); $energy=$info->energy - rand(1,3); if ($energy <= "0"){ $update=health; $thing=$info->health - rand(1,3); $energy_new="0"; }elseif ($energy > "0"){ $update=energy; $thing=$info->energy - rand(1,3); } if (!$energy_new){ mysql_query("UPDATE users SET $update='$thing' WHERE username='$username'"); }elseif ($energy_new){ mysql_query("UPDATE users SET $update='$thing', energy='0' WHERE username='$username'"); } } $most_online=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $timenow=time(); $now_online =mysql_num_rows(mysql_query("SELECT * FROM users WHERE online > '$timenow'")); if ($now_online > $most_online->online){ mysql_query("UPDATE site_stats SET online='$now_online' WHERE id='1'"); } $drop =mysql_query("SELECT * FROM casinos"); while($tard=mysql_fetch_object($drop)){ $per = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard->owner'")); if ($per->status == "Dead" || $per->status == "Banned"){ mysql_query("UPDATE casinos SET owner='0' WHERE casino='$tard->casino' AND owner='$tard->owner'"); } } $drop_bar =mysql_query("SELECT * FROM bar"); while($tard_bar=mysql_fetch_object($drop_bar)){ $per_bar = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_bar->owner'")); if ($per_bar->status == "Dead" || $per_bar->status == "Banned"){ mysql_query("UPDATE bar SET owner='0' WHERE owner='$tard_bar->owner'"); } } $drop_bf =mysql_query("SELECT * FROM bf"); while($tard_bf=mysql_fetch_object($drop_bf)){ $per_bf = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_bf->owner'")); if ($per_bf->status == "Dead" || $per_bf->status == "Banned"){ mysql_query("UPDATE bf SET owner='0' WHERE owner='$tard_bf->owner'"); } } if ($info->banktime <= time() && $info->bank > "0"){ $nmoney = 10 * $info->bank / 100; $money_in = $info->bank + $nmoney; $money_in= round($money_in); $recieve = $info->money + $money_in; mysql_query("UPDATE users SET money = '$recieve', bank='0', banktime='0' WHERE username='$username'"); } $drop_und =mysql_query("SELECT * FROM shop"); while($tard_und=mysql_fetch_object($drop_und)){ $per_und = mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$tard_und->owner'")); if ($per_und->status == "Dead" || $per_und->status == "Banned"){ mysql_query("UPDATE shop SET owner='0' WHERE owner='$tard_und->owner'"); } } $user_info=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($user_info->jail_able == "1" && $user_info->jail_untill <= time()){ mysql_query("UPDATE user_info SET jail_able='0' WHERE username='$username'"); } $user_shit=mysql_fetch_object(mysql_query("SELECT * FROM user_info WHERE username='$username'")); if ($user_shit->last_respect < time() && $fetch->rank != "Tramp"){//this one if ($info->rank == "Paper Kid"){ $new_res="1"; }elseif($info->rank == "Thief"){ $new_res="2"; }elseif($info->rank == "Hooligan"){ $new_res="3"; }elseif($info->rank == "Criminal"){ $new_res="4"; }elseif($info->rank == "Gangster"){ $new_res="5"; }elseif($info->rank == "Boss"){ $new_res="6"; }elseif($info->rank == "Supreme Boss"){ $new_res="7"; }elseif($info->rank == "Don"){ $new_res="8"; }elseif($info->rank == "Legendry Don"){ $new_res="9"; }elseif($info->rank == "Head Moderator"){ $new_res="10"; }elseif($info->rank == "Moderator"){ $new_res="11"; }elseif($info->rank == "Admin"){ $new_res="12"; }elseif($info->rank == "MadeMan"){ $new_res="13"; }elseif($info->rank == "General"){ $new_res="14"; }elseif($info->rank == "Capo"){ $new_res="15"; }elseif($info->rank == "WarMaster"){ $new_res="16"; }elseif($info->rank == "Boss"){ $new_res="17"; }elseif($info->rank == "Godfather"){ $new_res="18"; }elseif($info->rank == "Don"){ $new_res="19"; }elseif($info->rank == "Boss of Bosses"){ $new_res="20"; }elseif($info->rank == "Mob Boss"){ $new_res="21"; }elseif($info->rank == "WarGod"){ $new_res="22"; }elseif($info->rank == "Slayer"){ $new_res="23"; }elseif($info->rank == "Messiah"){ $new_res="24"; }elseif($info->rank == "SupremeBeing"){ $new_res="25"; } elseif($info->rank == "God"){ }//i added this but not sure where will i put this coz this elseif is lacking of } }//i added this coz there is no } to the if above $now=time() + (3600 * 24 * 7); mysql_query("UPDATE user_info SET respect='$new_res', last_respect='$now' WHERE username='$username'"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-591360 Share on other sites More sharing options...
PFMaBiSmAd Posted July 16, 2008 Share Posted July 16, 2008 I am not shooting down the effort you went through to help, but - im not sure i put them right That is why it is the responsibility of the programmer writing the code to find and fix his own basic syntax errors like this one. He is most familiar with the code and knows (or is supposed to know) what he intended the logic to be. For all we know several of them that you added are not in the correct location and it would take comparing the original lines of code with what you posted to learn exactly what was changed. Posting "fixed" code when there are more than 10-20 overall lines of code rarely helps the OP with his problem. Also, posted code is often altered to remove information and logic that someone does not want to be made public and posting "fixed" code then requires them to determine what part of what you fixed applies to the real code. Pointing out what is causing a syntax error like this one and letting the OP find and fix the problem in his actual code helps him the most. Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-591610 Share on other sites More sharing options...
willyamPax Posted July 17, 2008 Share Posted July 17, 2008 ur right i should not posted it when im not sure....i just pin point where he/she lacks on hi/her code... but still im not sure... im i being stupid or just being to much helpful....even if its not sure.. Quote Link to comment https://forums.phpfreaks.com/topic/114443-i-need-help-with-this-error/#findComment-592154 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.