my php script is like:
$mobnumber = mysqli_real_escape_string($conn, $_POST["mobnumber"]);
$name = mysqli_real_escape_string($conn, $_POST["name"]);
$state = mysqli_real_escape_string($conn, $_POST["state"]);
$role = mysqli_real_escape_string($conn, $_POST["role"]);
$designation = mysqli_real_escape_string($conn, $_POST["designation"]);
$organisation = mysqli_real_escape_string($conn, $_POST["organisation"]);
$mail = mysqli_real_escape_string($conn, $_POST["mail"]);
$addr = mysqli_real_escape_string($conn, $_POST["addr1"].", ".$_POST["addr2"].", ".$_POST["addr3"].", ".$_POST["addr4"].", ".$_POST["addr5"]);
$sql="INSERT INTO admin_reg VALUES (null, '$mobnumber', '$name', '$state', '$role', '$designation', '$organisation', '$mail', '$addr')";
my form space for the mobnumber field is:
<label class="description" for="mobnumber">Contact Number </label>
<div>
<input id="mobnumber" name="mobnumber" class="element text medium" type="text" maxlength="255" value=""/>
</div>
No matter what value i enter in the mobile number field, im getting it as the random mobile number of the first test case.
Aucun commentaire:
Enregistrer un commentaire