include ("signup.html");
// Replace the variable values below // with your specific database information. $host = "68.178.142.193"; $user = "RootSpread"; $pass = "Mice11223@"; $db = "accounts"; // This part sets up the connection to the // database (so you don't need to reopen the connection // again on the same page). $ms = mysql_pconnect($host, $user, $pass); if ( !$ms ) { echo "Error connecting to database.\n"; } // Then you need to make sure the database you want // is selected. mysql_select_db($db); if ( $_GET["op"] == "reg" ) { $bInputFlag = false; foreach ( $_POST as $field ) { if ($field == "") { $bInputFlag = false; } else { $bInputFlag = true; } } if ($bInputFlag == false) { die("Problem with your registration info. Please go back and try again."); } $q = "INSERT INTO `accounts` (`firstname`,`initial`,`lastname`,`email`,`password`,`dob`,`number`,`sex`) " ."VALUES ('".$_POST["firstname"]."', '".$_POST["initial"]."', '".$_POST["lastname"]."', '".$_POST["email"]."', '" ."PASSWORD('".$_POST["password"]."'), '".$_POST["dob"]."', '".$_POST["number"]."', '".$_POST["sex"]."') "; $r = mysql_query($q); if ( !mysql_insert_id() ) { die("Error: User not added to database."); } else { Header("Location: index.html"); } if( $_GET["op"] == "thanks" ) { echo "<h2>Thanks for registering!</h2>"; } ?> //this is line 65
if ( $_GET["op"] == "reg" )
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)