WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

No Error, But Not Adding Data to Database

Brem

New member

0

0%

Status

Offline

Posts

35

Likes

0

Rep

0

Bits

185

8

Months of Service

0%
Hello, I just wrote the following code but I can't seem to find my error. Additionally, it's not showing any errors, but when I click the submit button, it stays on a blank page. The code line from the included settings file is; $connect = @mysql_connect("localhost","root",""); $db = @mysql_select_db("record", $connect); ?> The codes in the file where I am trying to create a registration form are; Registration Test if($_POST){ $name = $_POST["name"]; $surname = $_POST["surname"]; $email = $_POST["email"]; $username = $_POST["username"]; $password = $_POST["password"]; $password_confirm = $_POST["password_confirm"]; $birthdate = $_POST["birthdate"]; if(!empty($name) && !empty($surname) && !empty($email) && !empty($username) && !empty($password) && !empty($password_confirm) && !empty($birthdate)){ $insert = mysql_query("insert into records (name,surname,email,username,password,password_confirm,birthdate,approval) values ('$name','$surname','$email','$username','$password','$password_confirm','$birthdate',0)"); if($insert){ echo "Registration successful.."; } else{ echo "Registration unsuccessful!!".mysql_error(); } } } else{ ?> Registration Form Your Name: Surname: E-Mail Address: Username: Password Password Confirm Date of Birth: } ?>
 

254

6,645

6,665

Top