Signup.php
<form name="sign-up" method="post" action="process.php?action=sign-up">
<h3><span>Sign-Up</span></h3>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<thead> User Details </thead>
<tr>
<th scope="row">*User ID :</th>
<td><label for="playerid"></label>
<input type="text" name="playerid" id="playerid" required="required"></td>
</tr>
<tr>
<th scope="row">*Name :</th>
<td><label for="playername"></label>
<input type="text" name="playername" id="playername" required="required"></td>
</tr>
<tr>
<th scope="row">*Mobile Number :</th>
<td><label for="playermob"></label>
<input type="text" name="playermob" id="playermob" required="required"></td>
</tr>
<tr>
<th scope="row">*E-Mail :</th>
<td><label for="playermail"></label>
<input type="text" name="playermail" id="playermail" required="required"></td>
</tr>
<tr>
<th scope="row">Address :</th>
<td><label for="playeraddress"></label>
<textarea name="playeraddress" id="playeraddress" cols="45" rows="5"></textarea></td>
</tr>
<tr>
<th scope="row"> </th>
<td><input type="submit" name="cancel" id="cancel" value="Cancel">
<input type="submit" name="submit" id="submit" value="Submit"></td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
</tr>
<tr>
<th colspan="2" scope="row"> </th>
</tr>
</table>
</form>
Process.php
function signup()
{
$playerid = $_POST['playerid'];
$playername = $_POST['playername'];
$playermob = $_POST['playermob'];
$playermail = $_POST['playermail'];
$playeraddress = $_POST['playeraddress'];
// $playerid = mysqli_real_escape_string($playerid);
// $playername = mysqli_real_escape_string($playername);
// $playermob = mysqli_real_escape_string($playermob);
// $playermail = mysqli_real_escape_string($playermail);
// $playeraddress = mysqli_real_escape_string($playeraddress);
$sql = "INSERT INTO bookit_participants (`userid`,`username`,`usermail`,`userphone`,`useraddress`)".
"VALUES('".$playerid."','".$playername."','".$playermail."','$playermob','".$playeraddress."')";
$result=mysqli_query($conn, $sql);
echo $sql;
if (!$result) {
die('Could not update data: ' . mysqli_error());
} else {
echo "<script>
alert('You are successfully registered..!! continue to the booking confirmation..!!!');
</script>";
header('Location: ../index.php');
}
} //signup