I have made i Registre page but get this :
How do i fix it?
... Notice: Undefined index: _name in C:\wamp\www\paperblog\signup.php on line 2
Notice: Undefined index: _username in C:\wamp\www\paperblog\signup.php on line 3 ...
<?php
$name=$_POST['_name'];
$username=$_POST['_username'];
$gender=$_POST['_gender'];
$email=$_POST['_email'];
$password=$_POST['_password'];
$repassword=$_POST['_repassword'];
$question=$_POST['_question'];
$answer=$_POST['_answer'];
$sql="INSERT INTO members ('name', 'gender', 'city', 'email', 'username', 'password', 'question', 'answer') VALUES ('$name','$username',$gender','$email','$password','$question','$answer')";
include_once("header.html");
$localhost="localhost";
$db_user="root";
$db_password="";
$db_name="blog";
$connect=mysqli_connect("localhost","root","");
mysqli_select_db($connect,"blog");
include_once("header.html");
$msg='';
if ( isset( $_POST['submit'] ) )
if ( empty( $username ) )
$msg .='<br>Username Required</br>' ;
else if ( empty( $password ))
$msg .='Password is Required';
else if ( $password != $repassword)
$msg .='Password Mismatch';
else {
mysql_query($sql);
}
?>
if(isset($_POST['submit']))
. You are also missing the brackets as you don't have only one instruction in it. – D4V1D