TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 445
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 416
  • Total: 416

Tell A Friend Block

Started by RebelRose, August 29, 2006, 07:11:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pass25

I tink that the error it´s a conflict whith the  thank you mod.
Because the last html page, call the function thankyou.

Final60

Heya Im pretty sure ive entered all information required, everything works included the confirmation email to myself when someone sends an invitation, the only problem is that no invitation seems to get sent!

If someone could take the time to look at the following do double check for me, would appreciate that alot!


Quote<?PHP

// This following statement must be left intact.
// Taming The Beast Tell-A-Friend script V 1.2
// Taming the Beast.net - http://www.tamingthebeast.net
// Free Web Marketing and Ecommerce Resources
// By using this code you agree to indemnify
// Taming the Beast from from any liability that might arise
// from it's use.
// This following statement must be left intact.

# This section removes any nasty tags that the user may
# have input into any of the form fields

strip_tags($friendmail1);
strip_tags($friendmail2);
strip_tags($friendmail3);
strip_tags($email);
strip_tags($name);


# This section sends you a notification email when
# the form is used

// Your email address (for copies to be sent to you)
$emailto = "mail.final@virgin.net";

// Your email subject text
$esubject = "a page has been sent";

// The email text for copies sent to you
$emailtext = "
".$name." has used the tell-a-friend form. Their email address is ".$email."

The people they have recommended are:

".$friendmail1."
".$friendmail2."
".$friendmail3."

";
# Send the email to you
@mail("$emailto", $esubject, $emailtext, "From: $email");

## This section sends to the recipients
// Target page after successful submission
$thankyoupage = "http://www.dcpryzom.co.uk/forum/index.php?action=Thank%20You";

// Change the subject text below to suit
$tsubject = "Invitation to join DCP!!!";

// Change the text below for the email
$ttext = "
Hi,

A friend of yours, ".$name.", whose email address is ".$email." thought you may like to visit our forum!! ".$name." has used our Tell-a-Friend form to send you this

email.

Join us in Ryzom, World of Warcraft and many other games on multiple platforms.

Visit our site for more info.

www.dcpryzom.co.uk/forum";

# This sends the email to the addresses entered
@mail("$friendmail1,$friendmail2,$friendmail3", $tsubject, $ttext, "FROM: $email");

# After submission, the target URL
header("Location: $thankyoupage");
exit;
?>



Tell a friend page:
Quote<title>tell a friend</title>
<script language="javascript">
<!--

function reset() {
document.tellafriend.name.value="";
document.tellafriend.email.value="";
document.tellafriend.friendmail1.value="";
document.tellafriend.friendmail2.value="";
document.tellafriend.friendmail3.value="";
}

function validate() {


if (document.tellafriend.friendmail1.value.length==0) {
alert("please enter your friend's email address");
return false;
}

if (document.tellafriend.email.value.length==0) {
alert("please enter your email address");
return false;
}
if (document.tellafriend.name.value.length==0) {
alert("please enter your name");
return false;
}

document.tellafriend.submit()
return true;
}

//-->
</script>
</head>
<body onload="reset()" topmargin="0" leftmargin="0">
<center>
</center>
<table width="500" cellpadding="0" cellspacing="0" align="center">
  <tr valign="top">
    <td valign="middle" align="center"><img

src="http://www.finalonline.co.uk/mypics/ryzom/recruit.gif" width="468" height="85"></td>
  </tr>
  <tr valign="top">
    <td valign="middle" align="center"> <p><font color="#666666" size="4" face="Arial">Complete
        the details below to send our link to your friends.</font></p>
      <form name="tellafriend"

action="http://www.dcpryzom.co.uk/forum/Themes/df_tp/tellafriend.php" method="post"

onsubmit="return checkfields()">
        <div align="center">
          <center>
            <table width="500" border="0" cellpadding="10" cellspacing="0">
              <tr>
                <td><font color="#666666" size="2" face="Arial"> *your
                  name:</font>
</td>
                <td> <font color="#666666" size="2" face="Arial">
                  <input size="30" name="name" maxlength="45">
                  </font>
</td>
              </tr>
              <tr>
                <td><font color="#666666" size="2" face="Arial">*your
                  email:</font>
</td>
                <td> <font color="#666666" size="2" face="Arial">
                  <input size="30" name="email" maxlength="45">
                  </font>
</td>
              </tr>
              <tr>
                <td colspan="2"> <p align="center"><font color="#666666"><font size="2"

face="Arial">please
                    enter your friend's email addresses:</font>
</font></td>
              </tr>
              <tr>
                <td><font color="#666666" size="2" face="Arial">*email
                  1:</font>
</td>
                <td> <font color="#666666" size="2" face="Arial">
                  <input size="30" name="friendmail1" maxlength="45">
                  </font>
</td>
              </tr>
              <tr>
                <td><font color="#666666" size="2" face="Arial">email
                  2:</font>
</td>
                <td> <font color="#666666" size="2" face="Arial">
                  <input size="30" name="friendmail2" maxlength="45">
                  </font>
</td>
              </tr>
              <tr>
                <td><font color="#666666" size="2" face="Arial">email
                  3:</font>
</td>
                <td> <font color="#666666" size="2" face="Arial">
                  <input size="30" name="friendmail3" maxlength="45">
                  </font>
</td>
              </tr>
              <tr>
                <td colspan="2"> <p align="center"><font color="#666666"><font size="2"

face="Arial">
                    The email that will be sent will contain your name and email
                    address.

                    <input onclick="validate();" type="button" value="click here to send">
                    </font>
</font></td>
              </tr>
            </table>
          </center>
        </div>
      </form></td>
  </tr>
  <tr valign="top">
    <td valign="middle" align="center">&nbsp; </td>
  </tr>
</table>
</body>
</html>

Thank you page

Quote<html>
<head>
</head>
<body onload="reset()" topmargin="0" leftmargin="0">
<center>
</center>
<table width="500" cellpadding="0" cellspacing="0" align="center">
  <tr valign="top">
    <td valign="middle" align="center">&nbsp;</td>
  </tr>
  <tr valign="top">
    <td valign="middle" align="center"><img src="http://www.finalonline.co.uk/mypics/ryzom/thankyou.gif" width="250"

height="250"></td>
  </tr>
  <tr valign="top">
    <td valign="middle" align="center">&nbsp; </td>
  </tr>
</table>
</body>
</html>

Lafemme

Hi, i have the same problem as whocares.. I do receive an mail that someone has recoomended the site.. but in not in detail.. i get the same message :

"has used the tell-a-friend form. Their email address is

The people they have recommended are:"

also i have send a test e-mail.. i do not seem to receive the recommendation.

does anybody know what could be wrong?

IchBin

I would check with your host to see if they have disabled the PHP mail function.

Lafemme

oke.. i run my own server.. :D how should i check this?

IchBin

Look at your PHP configuration and see. This isn't a PHP server site. You should be able to find everything you need with a google search. You can start with this page that might help you.
www.php.net/phpinfo

Otherwise, you need to look in your php.ini file.

Lafemme

oke.. thank you :) i will do that

Lafemme

hi... the hosting company who i rent the connection from has checked every setting and made php test mails.  Al these settings seme to be correct, so in there eyes it has to do something with the script

IchBin

Take the @ sign off of this line and see if it gives you any error when submitting the form again.
@mail("$friendmail1,$friendmail2,$friendmail3", $tsubject, $ttext, "FROM: $email");

Lafemme


This website is proudly hosted on Crocweb Cloud Website Hosting.