Jump to content

Quick Help Please! :)


Fredrik

Recommended Posts

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 :P

Tell me if you need to know more :)

Link to comment
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.