three pieces of php
okay … I have been fine inserting data to an sql db from php and fine with displaying it … But … Delete and update have gotten me blank ….
someone point me in the right direction… i need something along the lines of ….
$id = $_post['entry id']; $pos = $_post['position'];
update position …. set pos to $pos where id = $id
I know thats no php code but thats what i basicly want it to do ….
Also … what is wrong with this script
$id = $_POST['id'];
include ("config.php");
database_connect();
mysql_query("DELETE FROM perfect_nav WHERE id='$id'")
or die(mysql_error());
?>
Then i need a script that will … If config.php has already been included do nothing … if config.php has not been included include it …
Thanks Dotti.
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\delnav.php on line 2
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\xampp\htdocs\delnav.php on line 2
I have definately declared the user details in config.php though :S