Jump to content

[SOLVED] inserting into database


sfx81

Recommended Posts

You mean other than the fact that you're begging for someone to hack your site?

 

mysql_query
("Insert into userinfo(username,email,password,location)
values
( '{$_REQUEST['userid']}' , '{$_REQUEST['email']'}, '{$_REQUEST['password']'}, '{$_REQUEST['location']}')");

 

also your first var in the values list is 'userid' i suspect you meant 'username'

Try:

If you're using $_POST vars use:

mysql_query ("Insert into `userinfo` (`username`,`email`,`password`,`location`) VALUES ( $_POST['userid'] , $_POST['email'], $_POST['password'], $_POST['location'])" );

If you're using $_GET vars use:

mysql_query ("Insert into `userinfo` (`username`,`email`,`password`,`location`) VALUES ( $_GET['userid'] , $_GET['email'], $_GET['password'], $_GET['location'])" );

Archived

This topic is now archived and is closed to further replies.

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