Jump to content

Registration forum help! should be easy


fus10n

Recommended Posts

Okay, so im making a basic registration forum but keep getting an error on line 29. Here is the code:

    <?PHP   
      // register2.php  
      include("dbconnect.php");  
      $errors = "";  
      if (!isset($_POST['username']))  
        $errors .= "Please provide a username. <br/>";  
      if (!isset($_POST['password']))  
        $errors .= "Please provide a password. <br/>";  
      if (!isset($_POST['email']))  
        $errors .= "Please provide an email address. <br/>"; 
  if (!isset($_POST['first']))  
        $errors .= "Please provide a First Name. <br/>";
  if (!isset($_POST['last']))  
        $errors .= "Please provide a Last Name. <br/>";
	if (!isset($_POST['country']))  
        $errors .= "Please provide a Country. <br/>";
	if (!isset($_POST['state']))  
        $errors .= "Please provide a State. <br/>";
	if (!isset($_POST['street']))  
        $errors .= "Please provide a Street Address. <br/>";
	if (!isset($_POST['city']))  
        $errors .= "Please provide a City. <br/>";
	if (!isset($_POST['zip']))  
        $errors .= "Please provide a Postal Code. <br/>";
      if ($errors == "") {  
        mysql_query("INSERT INTO user_list VALUES(  
                            '',  
                            '".addslashes($_POST['username'])."',  
                            '".md5($_POST['password])."',  
                            '".addslashes($_POST['email'])."',
						'".addslashes($_POST['first'])."', 
						'".addslashes($_POST['last'])."', 
						'".addslashes($_POST['country'])."', 
						'".addslashes($_POST['state'])."', 
						'".addslashes($_POST['street'])."', 
						'".addslashes($_POST['city'])."', 
						'".addslashes($_POST['zip'])."', 
                            ") or die(mysql_error());  
        echo "Registration Successful!";  
      } else {  
         echo $errors."Please go back and try again.";  
      }  
    ?>  

Link to comment
https://forums.phpfreaks.com/topic/232613-registration-forum-help-should-be-easy/
Share on other sites

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.