Mark F Posted June 6, 2008 Posted June 6, 2008 I am trying to install 'Marriage Pro', though I keep getting this error after I insert the code into index.php Parse error: syntax error, unexpected $end in /home/marfur93/public_html/index3.php on line 74 Does anyone know why this is? On line 74 in index.php it just says ?> Quote
Mark F Posted June 6, 2008 Author Posted June 6, 2008 Re: Help with Syntax Error P.S. I get the error message when I add the following sode to my index.php $mq=mysql_query("SELECT * FROM `marriages` WHERE (`marriage_to` = '{$userid}') OR (`marriage_from` = '{$userid}')",$c); if(mysql_num_rows($mq)) { $mr=mysql_fetch_array($mq); if($mr['marriage_from'] == $userid) { $user=$mr['marriage_to']; } else { $user=$mr['marriage_from']; } $get_U=mysql_query("SELECT * FROM users WHERE userid=$user",$c); $gr=mysql_fetch_array($get_U); Quote
Tezza` Posted June 6, 2008 Posted June 6, 2008 Re: Help with Syntax Error I am trying to install 'Marriage Pro', though I keep getting this error after I insert the code into index.php Parse error: syntax error, unexpected $end in /home/marfur93/public_html/index3.php on line 74 Does anyone know why this is? On line 74 in index.php it just says ?> Try putting a } bwfore you ?> Quote
Mark F Posted June 6, 2008 Author Posted June 6, 2008 Re: Help with Syntax Error Thanks for your help, though it now says the following: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/marfur93/public_html/index3.php on line 10 Here is the code with line numbers: 09 $mq=mysql_query("SELECT * FROM `marriages` WHERE (`marriage_to` = '{$userid}') OR (`marriage_from` = '{$userid}')",$c); 10 if(mysql_num_rows($mq)) 11 { 12 $mr=mysql_fetch_array($mq); 13 if($mr['marriage_from'] == $userid) { $user=$mr['marriage_to']; } else { $user=$mr['marriage_from']; } 14 $get_U=mysql_query("SELECT * FROM users WHERE userid=$user",$c); 15 $gr=mysql_fetch_array($get_U); Quote
Tezza` Posted June 6, 2008 Posted June 6, 2008 Re: Help with Syntax Error change rows to array i think Quote
Mark F Posted June 7, 2008 Author Posted June 7, 2008 Re: Help with Syntax Error Sorry that I am new to this, though what do you mean exactly? Quote
Tezza` Posted June 7, 2008 Posted June 7, 2008 Re: Help with Syntax Error on line 10, change the word "rows" to "array" Quote
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.