Domanda

After registering there is no "Registered Successfully" message and no redirection to index.php. Need help, please.

<?php
include("connect.php");

if (isset($_POST['save']))
{
  addcustomer($_POST['firstname'],$_POST['middlename'],$_POST['lastname'],
              $_POST['email'],$_POST['username'],$_POST['password'],
              $_POST['age'],$_POST['gender'],$_POST['barangay'],
              $_POST['com_address']);
  $success = "<script language='javascript' >
              alert('Register Succesfully')
              window.location='index.php'
              </script>";
}
?>
È stato utile?

Soluzione

You need to output $success variable

Either echo $success; or print $success; before the }

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top