//that's php file
<?php
if (isset($_post['cree'])) {
require('/config/connexion.php');
if (!empty(isset($_post['email'])) && !empty(isset($_post['pwr'])) && !empty(isset($_post['number'])) && !empty(isset($_post['username']))) {
$email = htmlspecialchars($_post['email']);
$tel = htmlspecialchars($_post['number']);
$nom = htmlspecialchars($_post['nom']);
$email = password_hash($_post['email'], PASSWORD_DEFAULT);
$test = $bdd->prepare("SELECT * FROM user WHERE email=?");
$test->execute(array($email));
if ($test->rowCount() == 0) {
$req = $bdd->prepare('INSERT INTO user(email,mdp,nom,tel) VALUES(?,?,?,?) ');
$req->execute(array($email,$mdp,$nom,$tel));
$req->closeCursor();
$success="You have been successfully registered";
} else {
$msg = "A user with email " . $email . " already exists on this platform";
}
} else {
$msg = "Please fill in all fields";
}
}
?>
I need to know can i get a data of locale storage with php to store it to mySql. now I’m trying to retrieve data from local storage, but I can’t.
New contributor
Warano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.