#!/usr/local/bin/php $host = 'localhost'; $user = 'madmax'; $password = 'gUwY4K5s'; $db_name = 'madmax'; $hostname = 'mysql.internal'; $to = 'gary.madmax@gmail.com'; $dbh = mysql_connect($host, $username, $password); $selected = mysql_select_db($db_name,$dbh); $name= $_POST["username"]; $comment = $_POST["comment"]; if($name!="" && $comment!=""){ if(mail($to,"A commented has been posted on the Mermaid album",$comment,"From: $name\n")) { //Get details for possible addition $insert = "INSERT INTO comments(name,message, pic) VALUES(\"".$name."\", \"".$comment."\",6);"; mysql_query($insert); } else { echo "There was a problem sending the mail. Please check that you filled in the form correctly."; } }else{ } $insert = "SELECT * FROM comments where pic=6 ORDER By val;"; $result = mysql_query($insert); ?>
Possibly the last Mermaid parade ever at Coney Island, NY
Name | Messsage |
");
echo("$name "); echo(" | ");
echo("");
echo("$message "); echo(" | ");
echo("