Forum Moderators: coopster
=============================================
<?
if ($submit == 1) {
mysql_query("INSERT INTO `sermons` (`title`, `text`) VALUES ('$title', '$text')");
$records = mysql_query("SELECT `id` FROM `sermons` ORDER BY `id` DESC LIMIT 0, 1");
$row = mysql_fetch_array($records);
$pagenumber = $row[id];
$pageid = "sermon".$pagenumber.".php";
$file=fopen("$pageid","w");
$contents="<" . "? \$id = '$pagenumber'; include(\"display.php\");?" . ">";
fwrite($file,$contents);
fclose($file);
print "The value of submit is $submit<br>";
print "The value of title is $title<br>";
print "New sermon added <a href='http://example.com/support/add.php'>Click Here to Add Another Sermon, Johnny</a>.";
print "<br><br>";
};
print "<ul>";
$result = mysql_query('SELECT * FROM `sermons` WHERE `active` = 1 ORDER BY `rank` ASC');
while($row = mysql_fetch_array($result)) {
print "<li><a href='http://example.com/sermons/sermon$row[id].php'><font face='arial' color='#ffffff' size='3'><b>$row[title]</b></font></a><br>";
};
print "</ul>";
?>
==================================================
Everything is working, except that no data is being written to the database. It worked on the first try, but it has not worked since.
Any ideas?
[edited by: eelixduppy at 9:58 pm (utc) on Feb. 10, 2008]
[edit reason] example.com [/edit]