Howdy~
Here is my short php code and now sure why I get the error message:
Parse error: syntax error, unexpected $end in /home/content/28/8455828/html/tellafriend.php
PHP Code:
<?php
if(count($_POST)) {
foreach(array('friendmail1','friendmail2','friendmail3','email','name') as $key) $_POST[$key] = strip_tags($_POST[$key]);
if(!is_secure($_POST)) { die("Asta la vista Hacker");}
$emailto = "me@mysite.com";
$esubject = "A page has been sent";
$emailtext = "
$_POST[name] has used the tell-a-friend form. Their email address is $_POST[email]
The people they have recommended your site to are:
$_POST[friendmail1] $_POST[friendmail2] $_POST[friendmail3] ";
@mail("$emailto", $esubject, $emailtext, "From: $_POST[email]");
$thankyoupage = "/thankyou.html";
$tsubject = "A web site recommendation from $_POST[name]";
$ttext = "
Hello,
A friend of yours, $_POST[name] , whose email address is $_PO[email] likes http://mysite.com
?>
Thanks for ya help on this
Tasmanian
"It is better to keep your mouth shut and look like a fool, rather than open your mouth and be a fool!!!"
"It is better to say nothing, and be thought a fool, rather than open your mouth and confirm it!!!"
You may have cut your ending part of the script. First thought it's indeed, close $ttext string. But as I see, it should also be followed by another call to mail(), after that a closing braket and so on. Be sure you copied all the script.
foreach(array('friendmail1','friendmail2','friendmail3','email','name') as $key) $_POST[$key] = strip_tags($_POST[$key]);
if(!is_secure($_POST)) { die("Asta la vista Hacker");}
$emailto = "me@mysite.com";
$esubject = "A page has been sent";
$emailtext = "
$_POST[name] has used the tell-a-friend form. Their email address is $_POST[email]
The people they have recommended your site to are:
$_POST[friendmail1] $_POST[friendmail2] $_POST[friendmail3] ";
@mail("$emailto", $esubject, $emailtext, "From: $_POST[email]");
$thankyoupage = "/thankyou.html";
$tsubject = "A web site recommendation from $_POST[name]";
$ttext = "
Hello,
A friend of yours, $_POST[name] , whose email address is $_PO[email] likes http://mysite.com and thought you might like the site as well.;
?>
That is my entire code but now getting an error message:
Parse error: syntax error, unexpected $end in /home/content/28/8455828/html/tellafriend.php
Thanks
"It is better to keep your mouth shut and look like a fool, rather than open your mouth and be a fool!!!"
"It is better to say nothing, and be thought a fool, rather than open your mouth and confirm it!!!"
Howdy~
I am doin something wrong adjusted everything like mentioned and still gettin error message:
Parse error: syntax error, unexpected $end in /home/content/28/8455828/html/tellafriend.php
Any ideas¿
Thanks
"It is better to keep your mouth shut and look like a fool, rather than open your mouth and be a fool!!!"
"It is better to say nothing, and be thought a fool, rather than open your mouth and confirm it!!!"
Bookmarks