I have no ideea why but i get a few errors in my PHP I have tried everything and i simply cannot get it to work,if anyone could help me a bit that would be great
Notice: Undefined index: confirmpassword in
C:\xampp\htdocs\photographer\register\form.php on line 7
Notice: Undefined index: username in
C:\xampp\htdocs\photographer\register\form.php on line 8
Notice: Undefined index: email in
C:\xampp\htdocs\photographer\register\form.php on line 9
Notice: Undefined index: password in
C:\xampp\htdocs\photographer\register\form.php on line 10
my code is
<?php
session_start();
$_SESSION['message'] = '';
require_once "../db/connect.php";
if ($_POST['password'] == $_POST['confirmpassword']) {
$username = mysqli_real_escape_string($_POST['username']);
$email = mysqli_real_escape_string($_POST['email']);
$password = md5($_POST['password']);
$query = "INSERT INTO finalx VALUES ('$username' '$password' '$email')";
if (mysqli_query($query) == true) {
$_SESSION['message'] = 'Inregistrare reusita';
header("Location: welcome.php");
}
else {}
}
?>