Fredrik Posted May 3, 2011 Share Posted May 3, 2011 Hey im new to this site and I really need some help! This is the error i get "Parse error: syntax error, unexpected T_STRING, expecting '(' in /home/a5290991/public_html/pages/regaction.php on line 37" and when i go to that line on that page the code is this if (mysql_num_rows(SELECT * FROM accounts WHERE name = '".sql_injectionproof($_POST['account'])."'")) >= 1) { echo 'This account id already exists!'; $registered = false; Please whats wrong? im new to this and just editing a done website but need to get that to work! It's probably easy Tell me if you need to know more Link to comment https://forums.phpfreaks.com/topic/235423-quick-help-please/ Share on other sites More sharing options...
Fredrik Posted May 3, 2011 Author Share Posted May 3, 2011 Also i get this error "Parse error: syntax error, unexpected ')' in /home/a5290991/public_html/pages/rankings.php on line 98" The code on line 98 is : <?php $i = $start; $sql = mysql_query("SELECT characters.name , characters.job , characters.level, characters.rebirths, accounts.loggedin, accounts.votingpoints FROM characters, accounts WHERE characters.accountid=accounts.id and characters.gm = 0 and accounts.banned = 0 ORDER BY characters.rebirths DESC, characters.level DESC LIMIT ".sql_injectionproof($start).", 10"); (**98**) while ($outcome = mysql_fetch_array($sql)) { ?> Link to comment https://forums.phpfreaks.com/topic/235423-quick-help-please/#findComment-1209880 Share on other sites More sharing options...
fugix Posted May 3, 2011 Share Posted May 3, 2011 firstly.. in order to use mysql_num_rows...you must query your sql code first..like this $sql = ("SELECT * FROM accounts WHERE name = '{.sql_injectionproof($_POST['account'])}'"); $query = mysql_query($sql); $num_rows = mysql_num_rows($query); Link to comment https://forums.phpfreaks.com/topic/235423-quick-help-please/#findComment-1209906 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.