Jump to content

Registration Errors


wro

Recommended Posts

Hello all, new to the site and new(ish) to php.  I'm attempting to get a registration going for a php game, but it's returning an error.  It's returning "could not register" 

 

Thanks in advance to any ideas =D

 

      $password=md5($password);
      $date=round(date("U")/1000);
      srand($date);
      $thekey=rand(1,100000000);
      $thekey=md5($thekey);
      $SQL = "INSERT into wr_users(playername, password, email, str, end, int, luck, dead, turns, gold, validated, validkey) VALUES ('$player', '$password', '$email', '3', '3', '3', '3', '0', '20', '12', '0', '$thekey')"; 
      mysql_query($SQL) or die("could not register");

 

[attachment deleted by admin]

Link to comment
Share on other sites

At least 'int' is a reserved mysql keyword (there is a table of reserved words in the mysql manual.) You either need to rename your int column to something else or enclose it in back-ticks `` every time you use it in a query.

 

Damn, can't believe I didn't notice that.

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.