Antec Posted August 1, 2008 Share Posted August 1, 2008 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 More sharing options...
AdRock Posted August 1, 2008 Share Posted August 1, 2008 Where are your post varaibles from the form? The ones that you would be inserting in the database? Link to comment https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/#findComment-605129 Share on other sites More sharing options...
Antec Posted August 1, 2008 Author Share Posted August 1, 2008 'member', '$member[name]', '$ip', '$enurl', '$member[gender]', '$member[country]', '$pass2', '$member[chatpass]', '$member' Link to comment https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/#findComment-605136 Share on other sites More sharing options...
PFMaBiSmAd Posted August 1, 2008 Share Posted August 1, 2008 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. Link to comment https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/#findComment-605142 Share on other sites More sharing options...
Antec Posted August 1, 2008 Author Share Posted August 1, 2008 what exactly would i add and to where to get it to post correctly? It is not posting to another file just in it's self...If you get what I mean Link to comment https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/#findComment-605147 Share on other sites More sharing options...
Antec Posted August 2, 2008 Author Share Posted August 2, 2008 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. Link to comment https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/#findComment-605811 Share on other sites More sharing options...
Antec Posted August 2, 2008 Author Share Posted August 2, 2008 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] Link to comment https://forums.phpfreaks.com/topic/117651-register-info-not-inserting-into-tables/#findComment-605831 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.