Hey guys, thanks for your help thus far.
Here is my code as of now for the contact.php page. As you can see, i have changed the variables so that they don't conflict with the shoutboxes variables.
<?php
if($submit)
{
die('Contact submitted, mail() not working'); // Added die()
mail("psykogfx@psyko-gfx.com","$sub","$mess1","From: $name1 <$email1>");
?>
<form method="post" action="<?=$_SERVER['PHP_SELF']; ?>">
<p><strong>Name:</strong> <input type="text" name="name1">
<br>
<strong>Email:</strong> <input type="text" name="email1">
<br>
<strong>Subject:</strong> <input type="text" name="sub">
<strong><br>
Message:</strong></p>
<p>
<textarea name="mess1" rows="10" cols="30"></textarea>
<br>
<input type="submit" name="submit" value="Send">
</p>
</form>
My contact form is still not working, instead of getting to the page, i am getting an error.
Parse error: parse error, unexpected $ in /home/psyko-gf/public_html/beta/contact.php on line 30
Why am i getting this error?
rc69, to answer your question, you are right, neither the shoutbox, or the contact form are giving off any information. After i hit submit on the contact page, the form clears, and nothing happens. Same with the shoutbox. Here is the Shoutbox code.
<?php
mysql_connect("localhost","---------","---------"); //change username and password with your mySQL username and password. you can leave the "localhost" part alone, as it is just a standard thing.
mysql_select_db("---------"); //change the given database name with the name of the sql database where the shoutbox will be (i.e. root_shoutbox)
if($_POST['submit'])
{
$time=date("M j, Y"); //will display date in format Jul 25, 2005. If you want to change it, check out php.net for more info.
$result=MYSQL_QUERY("INSERT INTO shoutbox (`id`,`name`,`email`,`time`,`message`)".
"VALUES ('','$name','$email','$time','$message')");
}
$result = mysql_query("select * FROM shoutbox ORDER BY id desc limit 5");
while($r=mysql_fetch_array($result))
{
$id=$r["id"];
$name=$r["name"];
$email=$r["email"];
$time=$r["time"];
$message=$r["message"];
echo ("
<strong><a href=\"mailto:$email\">$name:</a></strong>
<br />
$time
<hr />
$message
<br /><br />
");
}
?>
<form action="<?php echo("$php_self"); ?>" method="post">
Name:<br />
<input type="text" name="name" /><br />
Email:<br />
<input type="text" name="email" /><br />
Message:<br />
<input type="text" name="message" /><br />
<input name="submit" type="image" class="submit" src="images/login_button_go.gif" alt="Post shout!" width="24" height="14" />
</form>
Please help.
Thanks!
Edited by iPsyko, 25 September 2005 - 04:23 PM.