Well, this was going fine until i changed the $sql from a select statement to an insert statement. Now i get a blank page, and no errors. As you can tell, i'm new (straight from .Net). Here's my code:
<?php
error_reporting(E_ALL);
$host="localhost";
$user="webuser";
$pwd="666";
$dbname="AlexGrim";
$sql="insert into Contents ('pagename','pagetitle','pageprev','pagenext','pagedate','pagecontent')values($_POST['pagename'],$_POST['pagetitle'],$_POST['pageprev'],$_POST['pagenext'],'',$_POST['pagecontent'])";
include_once('sql.php');
$sql2="select * from Content";
include_once('sql2.php');
?>
And here's the included file:
<?php
echo "<br/><br/>Beginning of sql include<br/><br/>";
if (!$link = mysql_connect($host, $user, $pwd)) {
echo 'Could not connect to mysql' . mysql_error();
exit;
}
if (!mysql_select_db($dbname, $link)) {
echo 'Could not select database' . mysql_error();
exit;
}
$result = mysql_query($sql, $link);
if (!$result) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
echo "<br/><br/>End of sql include<br/><br/>";
?>