Jump to content

Register Info Not Inserting Into Tables


Antec

Recommended Posts

The attached file is my register.php script. What is happening is when I test it but registering the site responds saying that the information has been entered correctly and I get the activation email but the link in the activation email doesn't work, and the reason for that is that nothing is being saved into the database. Now there are no connections errors as a matter of fact there are no errors at all which is confusing me. Any ideas?

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/
Share on other sites

The code is dependent on register_globals being on. Register_globals were turned off in php4.2 in the year 2002 (a full six years ago) and register_globals have been completely removed in upcoming php6.

 

You need to correct your code to use the proper external $_POST and $_GET variables from your form and url.

the script was working correctly until i added the chat pass section, so im not too sure how it should be coded. Can someone please help me make the correct changes or explain the process to me in some more detail please...im just a nooby here lol...I was going off of what wc3schools had as an example.

Ok...I have modified the code with some info I find through goolge and now it is creating the table for the user info but it is still not putting the info in....I have attached a new copy of the whole script named register2.txt and pasted below is what i added here is what i added on lines 379-396:

 

$status="member";

$status = $_POST['$status'];
$member[name] = $_POST['$member[name]'];
$ip = $_POST['$ip'];
$enurl = $_POST['$enurl'];
$member[gender] = $_POST['$member[gender]'];
$member[country] = $_POST['$member[country]'];
$member[chatpass] = $_POST['$member[chatpass]'];
$member[email] = $_POST['$member[email]'];
$anumber = $_POST['$anumber'];
$pass2 = $_POST['$pass2'];
$extrasql = $_POST['$extrasql'];

$query="INSERT INTO members (id, status, name, ipaddress, salt, gender, country, password, chatpass, email, joined, act)VALUES ('NULL', '".$status."', '".$member[name]."', '".$ip."', '".$enurl."', '".$member[gender]."', '".$member[country]."', '".$pass2."', '".$member[chatpass]."', '".$member[email]."', 'NULL', '".$anumber."')";

mysql_query($query) or die ('Error Updating The Database...Please Contact [email protected]');

 

[attachment deleted by admin]

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.