Jump to content
MakeWebGames

Register


ignite

Recommended Posts

Re: Register

You need to add it to the query aswell .

 

$db->query("INSERT INTO users (username, login_name, userpass, realname, lastname, age, aog, msn, aim, aol, yahoo, pers, level, money, points, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', ('{$_POST['password']}'), '{$_POST['realname']}', '{$_POST['lastname']}', '{$_POST['age']}', '{$_POST['aog']}', '{$_POST['msn']}', '{$_POST['aim']}', '{$_POST['aol']}', '{$_POST['yahoo']}', '{$_POST['pers']}', 1, $sm, 0, 0, 1, 100, 100, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')");

 

Like that but oviously change them to what yours are called.

Link to comment
Share on other sites

Re: Register

mysql_query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, name, age, homelocation, hobby, msn, occupation, promo ) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'male', unix_timestamp(), '{$_POST['email']}', -1, '$ip','{$_POST['name']}','{$_POST['age']},'{$_POST['homeloaction']}','{$_POST['hobby']}','{$_POST['msn']}','{$_POST['occupation']}','{$_POST['promo']}'", $c);

 

Thats what i have at the moment

Link to comment
Share on other sites

Re: Register

Everthing in the users table if it helps

 

userid username userpass level exp money crystals laston lastip job energy will maxwill brave maxbrave maxenergy hp maxhp lastrest_life lastrest_other location hospital jail fedjail user_level gender daysold signedup gang daysingang course cdays jobrank donatordays email login_name display_pic duties bankmoney cybermoney staffnotes mailban mb_reason hospreason voted honor turns cars_owned cars_won cars_lost cars_challs_sent cars_challs_accpt cars_challs_decln cars_races_won cars_races_lost cars_races_income cars_races_friendly cars_races_betted forums_avatar forums_signature posts forumban fb_reason valog valfail valid jailreason crimecount warnings wreason attackslost attackswon crimecountf signature usernotes validation valtries honored new_annoucement mine_level mine_exp mine_needed power max_power gems name age realage homelocation hobby msn occupation married

Link to comment
Share on other sites

Re: Register

change it to:

 

mysql_query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, name, age, homelocation, hobby, msn, occupation, promo ) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, 'male', unix_timestamp(), '{$_POST['email']}', -1, '$ip','{$_POST['name']}','{$_POST['age']},'{$_POST['homeloaction']}','{$_POST['hobby']}','{$_POST['msn']}','{$_POST['occupation']}','{$_POST['promo']}'", $c) or die(mysql_error());

 

and see what comes up

Link to comment
Share on other sites

Re: Register

Ok thanks well i typed in blah for everything and got this error:

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'blah','blah','blah','blah'' at line 1

Link to comment
Share on other sites

Re: Register

Ok thanks man i think were getting their i now get this error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Link to comment
Share on other sites

Re: Register

that wouldn't result in a t_string error, since it's only adding a character inside a string already

Try it again, otherwise im just blind/dont have enough to find it all out :P

Just make sure you test it with proper things (values you'd expect people to put in when registering)

Link to comment
Share on other sites

Re: Register

Thanks so much i had a look at other querys and found out i need a closing bracket after the speach mark so it looks like this {$_POST['promo']}')",$c);

But i don't need the promo bit as there isn't a promo collum. Thanks again +1 for you.

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...