How exactly is IF EXIST function used in MySQL?
Alternatively, how can one make sure that the values previously filled into the input fields are cleared completely so that they are not re-posted once the page is reloaded?
This is a slice of my code
<?php
function testInput($data){
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
if($_SERVER['REQUEST_METHOD']=='POST'){
$user = testInput($_POST['userName']);
$fName = testInput($_POST['fName']);
$lName = testInput($_POST['lName']);
$fPass = md5(testInput($_POST['fPass']));
$rPass = md5(testInput($_POST['rPass']));
$gender = testInput($_POST['gender']);
}
?>
I want to make sure that the value of my variables='' every time I refresh my page.
header('Location: ...');redirect to the same page.