par
chris51200 » 22 avr. 2007, 21:55
alors voivi mon script:
<?php
mysql_connect("localhost", "***", "***"); //localhost : ordi ou est installé mysql, login / password
mysql_select_db("site_michel"); // ouverture de la BDD "news"
mysql_query("UPDATE site_michel SET texte_annonce = $_POST['prenom'] WHERE id='1'") or die(mysql_error()); // Requête SQL
mysql_close(); // Déconnexion de MySQL
?>
$_post['prenom'] provenant evidement d'un formulaire
alors voivi mon script:
[php]
<?php
mysql_connect("localhost", "***", "***"); //localhost : ordi ou est installé mysql, login / password
mysql_select_db("site_michel"); // ouverture de la BDD "news"
mysql_query("UPDATE site_michel SET texte_annonce = $_POST['prenom'] WHERE id='1'") or die(mysql_error()); // Requête SQL
mysql_close(); // Déconnexion de MySQL
?>
[/php]
$_post['prenom'] provenant evidement d'un formulaire