Hello Dears Friends,
I want to make aRegistration form for users, and save data of user in my database.I tried my best best but cannt Please, check my Code.
<?php
include "conn.php"; //database connection file
if($_SERVER["REQUEST_METHOD"]=="POST"){
$username=filter_input(INPUT_POST,'uname',FILTER_SANITIZE_SPECIAL_CHARS);
$sql = "SELECT username FROM usersystem WHERE username = '$username'";
$result=$conn->query($sql);
if (!$result) {
echo "data has saved";
}
else{
echo "user already exists" ;
}
}
?>
apreaciated promp response...