Hi, I am trying to run this query. What it does is modify the row of a database, replacing the information with the submitted info via form. Problem is that the query doesn't execute, all I get is a blank page, no error messages or nothing. Here is teh code:
<?php
error_reporting(E_ALL);
include "common_db.php";
$host="localhost";
$user="****";
$password="****";
$db="****";
$conn=mysql_connect($host,$user,$password);
mysql_select_db($conn,$db);
if($_POST['submit'])
{
$pageid = $_POST["pageid"];
$pagename = $_POST["pagename"];
$pagecontent = $_POST["pagecontent"];
$pageurl = $_POST["pageurl"];
$pagemenu = $_POST["displaymenu"];
if (!mysql_query( sprintf("UPDATE content SET page_id = '$pageid', page_name = '$pagename', page_content = '$pagecontent', page_url = '$pageurl', display_menu = '$pagemenu' WHERE page_id = '$pageid'")))
{
echo mysql_error();
exit;
}
echo "Query finished!";
}
?>
Thanks for your help.😃