Eggblog 1 0 > Home / Comments.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Eggblog 1 0

Download:
eggblog-1-0.zip

Category:
Blog

Archive Content:

Images > Photos

Images > Photos > Category

Images > Photos > Full

Images > Photos > Preview

Images > Photos > Thumbnail

Images > Smilies

Images

Etc

Content:

Etc

Admin

Forum

Home

Photos

Rss

Etc

Admin

Comments.php:


<?php
if (isset($comments)) {
  
session_start();
  
$username=strtolower($_SESSION[eggblog]);
  require_once(
"../_etc/config.inc.php");
  require_once(
"../_etc/mysql.php");
  
$date=time();
  
$sql="INSERT INTO eggblog_comments SET date='$date',  article_id='$_POST[id]',  author='$username',  comments='$_POST[comments]'";
  if (
mysql_query($sql)) {
    
$ref $_SERVER["HTTP_REFERER"];
    
header("Location: blog.php?id=$_POST[id]#comments");
  }
  else {
    require_once(
"../_etc/header.php");
    echo 
"        <p><br /></p>\n        <p><b>There has been an error submitting your comments.</b></p>\n<p>Please <a href=\"javascript:history.go(-1)\">go back</a> and try again.</p>\n";
    require_once(
"../_etc/footer.php");
  }
}
?>


Other Blog Scripts:

WebMaster Resources Home

©RingsWorld.com