Pyro - This message is for you

liunx

Guest
I wanted you to help me get the script that your previously sent me back up and running. it is not working correctly for some reason. If you dont remember me refer back to the last thread with the subject (send email to a friend). You sent me a zip file containing 2 files, form.php and refer.php. the files dont seem to be working correctly anymore. maybe its because i changed web hosting companies. But when i file in the fields for name, email address and click on send. the message never gets to the person.<!--content-->Does your new server support PHP?<!--content-->yes it supports php<!--content-->you can goto my web site ... click on enter and then scroll down to where it says Like our site, tell a friend here. Click on here and the form should come up. fill it out and see what happens<br />
<br />
Moderator's note: Stop posting a link to that site. Period. This site will not be a doorway to such objectionable material. You will lose your mebership here if you persist in ignoring my warnings.<!--content-->Try these files, instead of the old one...<!--content-->I am at work and cant open the files right now because we dont have winzip at work. But when i open it will it be fairly easy for me to follow? Is it like the other zip files you sent me(form.php and refer.php) I just put both files in my public_html directory? Or maybe I am putting them in the wrong place. I dont know, geeezzzz<!--content-->I noticed an error in my code... Please try this instead an let me know if it works.<br />
<br />
Also, the files can go anywhere, just make sure you link to them correctly.<!--content-->its still not working how do i link to them correctly?<!--content-->it doesnt work<!--content-->Set up a PHP info script and send me the link...<br />
<br />
<?PHP<br />
phpinfo ();<br />
?><!--content-->what is a php info script? sorry<!--content-->The script on the bottom of my last messege. Throw it in a page named phpinfo.php and give me the link.<!--content-->...<br />
<br />
Moderator's note: Link to objectionable material removed.<!--content-->Ok...I don't have time right now to check into it, but will do so tomorrow.<!--content-->did you ever get a chance to check the script webpage?<!--content-->Not yet... I'll try to remember to do that tomorrow... I had a very hectic day.. :rolleyes:<!--content-->Ok, try this one out. It works a bit differently, so let me explain...<br />
<br />
You will need to make all your pages with a .php extention, as it writes the link in on each page. This is necessary, as getting the referring url isn't reliable. I also programmed this script to work with Registerd Globals off. Let me know if it works for you.<!--content-->I dont have winzip on this computer at work. That zip file you sent me I cant open. can you copy and paste each one and post is so I can read it. I want to try and see if I can get these scripts to work again.<!--content-->Well, ok. Here are the files. <br />
<br />
This is how you use it on your pages (note the link). The pages need to be .php<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<html><br />
<head><br />
<title>Untitled Document</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
</head><br />
<br />
<body><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"form.php?<? echo $_SERVER['PHP_SELF']; ?>">form test</a><br />
</body><br />
</html><br />
<br />
This is the page that they will use to fill their information in<br />
<html><br />
<head><title>Send this page to a friend</title></head><br />
<br />
<style><br />
.formbox {<br />
BORDER-RIGHT: 2px groove; BORDER-TOP: 2px groove; BORDER-LEFT: 2px groove; BORDER-BOTTOM: 2px groove; FONT-SIZE: 8pt; BACKGROUND: #dddddd; COLOR: #000000; FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif<br />
}<br />
.formbut {<br />
BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; FONT-SIZE: 8pt; BACKGROUND: #dddddd; COLOR: #000000; FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif<br />
}<br />
</style><br />
<br />
<body bgcolor="#eeeeee"><br />
<center><br />
Thank you for sending a link to this page to a friend. We hope they will enjoy it.<br />
<br />
<form action="refer.php" method="post"><br />
<p>Page you are sending: <br />
<?php $fullurl = "http://www.yourdomain.com".$_SERVER['QUERY_STRING'];<br />
echo "<a href='http://www.webdeveloper.com/forum/archive/index.php/$fullurl'>$fullurl</a>" ;<br />
echo"<input type='hidden' name='link' value=$fullurl>";?><br />
<br><br />
<br><br />
</p><br />
<table width="27%" border="0" cellspacing="0" cellpadding="0"><br />
<tr> <br />
<td width="50%">Friend's&nbsp;Name:</td><br />
<td width="50%"><br />
<input type="text" name="name" class="formbox"><br />
</td><br />
</tr><br />
<tr> <br />
<td>Friend's&nbsp;E-mail:</td><br />
<td><input type="text" name="email" class="formbox"></td><br />
</tr><br />
<tr> <br />
<td>Your&nbsp;Name:</td><br />
<td><input type="text" name="sendername" class="formbox"></td><br />
</tr><br />
<tr> <br />
<td>Your&nbsp;E-mail:</td><br />
<td><input type="text" name="senderemail" class="formbox"></td><br />
</tr><br />
</table><br />
<p> Your Message:<br><br />
<textarea name="message" cols="50" rows="5" class="formbox"></textarea><br />
<br><br />
<input type="submit" value="Send Page" class="formbut"><br />
<input type="reset" value="Reset" class="formbut"><br />
<input type="button" value="Back to Page" class="formbut" onClick="history.go(-1)"><br />
</p><br />
</form><br />
</center><br />
</body><br />
</html><br />
<br />
This is the page that takes the info they fill in, and sends the letter.<br />
<style><br />
.formbut {<br />
BORDER-RIGHT: 2px outset; BORDER-TOP: 2px outset; BORDER-LEFT: 2px outset; BORDER-BOTTOM: 2px outset; FONT-SIZE: 8pt; BACKGROUND: #dddddd; COLOR: #000000; FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif<br />
}<br />
</style><br />
<?<br />
mail($_POST['email'], $_POST['sendername']." thought you would enjoy this page","Hi ".$_POST['name']."!\n\n".$_POST['sendername']." (".$_POST['senderemail'].") thought you would enjoy the page found at ".$_POST['link'].".\n\nThey wrote the following message to you:\n\n".$_POST['message']."", "from: ".$_POST['senderemail']."\r\n");<br />
echo "<div align=\"center\"><table width=\"96%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" ";<br />
echo "style=\"font-size:11pt;font-color:black;\">";<br />
echo "<tr height=\"40\" align=center><td><p>&nbsp;</p></td></tr>";<br />
<br />
echo "<tr><td >An e-mail was sent to ".$_POST['name']." (<a href=http://www.webdeveloper.com/forum/archive/index.php/\"mailto:".$_POST['email']."\">".$_POST['email']."</a>), we hope they will enjoy the page at";<br />
echo " <a href=http://www.webdeveloper.com/forum/archive/index.php/".$_POST['link']." target=_blank>".$_POST['link']." </a><br><br>Your message was:<br>".$_POST['message']."";<br />
echo "<CENTER><FORM><INPUT type='button' value='Back to Page' class='formbut' onClick='history.go(-2)'></FORM></CENTER>";<br />
echo "</td></tr></table></div>";<br />
?><!--content-->
 
Back
Top