View previous topic :: View next topic |
Author |
Message |
shadowmancer -
Joined: 04 Jan 2004 Posts: 11
|
Posted: Sat Jan 17, 2004 2:23 am Post subject: Problems with my PHP script |
|
|
Hi im having a problem with a php script i wrote, could somebody help me please. Its a form mailer script.
This is the error i get
Parse error: parse error, unexpected T_STRING in C:\Program Files\Abyss Web Server\htdocs\sendmail.php on line 13
HTML
Code: |
<html>
<head>
<title>Form mailer</title>
</head>
<body bgcolor="#555555" text="#FFFFFF" link="#CCCCCC" alink="#CCCCCC" vlink="#CCCCCC" bottonmargin="0" topmargin="0" leftmargin="0" rightmargin="0">
<form method="post" action="sendmail.php">
<center>
Email: <input type="text" name="email"><br>
Message: <textarea name="message" rows="15" cols="40">
</textarea><br>
<input type="submit">
</form>
</body>
</html>
|
PHP
Code: |
<?php
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "youremail@yoursite", "It worked",
$message, "From: $email );
header ( "Location: http://www.yourdomain.com/thanks.html" );
?>
|
|
|
Back to top |
|
 |
Moxxnixx -
Joined: 21 Jun 2003 Posts: 1226 Location: Florida
|
Posted: Sat Jan 17, 2004 3:10 pm Post subject: |
|
|
In your php code, you have this:
"From: $email
It should be this:
"From: $email"
Cheers, |
|
Back to top |
|
 |
shadowmancer -
Joined: 04 Jan 2004 Posts: 11
|
Posted: Wed Jan 21, 2004 6:38 pm Post subject: |
|
|
Thanx ive made a register_globals=Off version now. That was part of the problem |
|
Back to top |
|
 |
|