这是我几年前做的一个小 php 程序(当时它工作了......)当我最近试图将它合并到我的新“网站”时,我的表中没有插入任何数据......
(当我运行它时,我没有收到任何错误消息)
如果有人能告诉我出了什么问题,我会很高兴的。谢谢!
// data,from a form on another page, that I want to insert in my db
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$date = $_POST['date'];
$identifiant = $_POST['identifiant'];
$password = $_POST['password'];
// connexion to my database
$connexion = mysql_connect("mysql5.000webh.com","a888888_user","mypassword");
mysql_select_db("a888888_mydatabase",$connexion);
// creation and sending of SQL query
$requete = "insert into panel values
('','$nom','$prenom','$date','$identifiant','$password')";
mysql_query($requete);
echo "Vos donnees ont ete envoyees !";
include('page.html');
// closing Mysql connexion
mysql_close();