Jump to content

New script installed with errors - Help Appreciated


returntherake

Recommended Posts

Hi,

 

I recently attempted to install a refer-a-friend script into my website but I really don't use PHP at all and even my html is very sloppy so it didn't get installed as planned.

It currently cuts out the bottom half of my website like so: http://www.returntherake.com/refer.php

Basically everything before the script is called is fine but everything after doesn't work. Heres the code from the point its installed till the end of my website.

 

Any help would be great. Thank you so much.

 

<script language="php">

 

// Number of friend feilds to put on the page

$tellnumber = "3";

 

// Subject of email

$subject = "Great Poker Rakeback Site";

 

// Message sent in the email

$message = "Look at this great site I found. I think you'll like it. It will boost your profits while playing online poker

by getting you some of your rake back.

http://www.ReturnTheRake.com/

When signing up with a website remember to say $_POST[name] referred you in the proper section. As you will recieve a 25% bonus on your first $20 rakeback recieved.";

 

// Url to redirect user to once they click submit

$thankyouurl = "http://www.returntherake.com/thankyou_refer.html";

 

 

 

 

//////////////////////////////////////////////////////////////////////////////////

// DO NOT EDIT ANYTHING BELOW THIS LINE                                        //

//////////////////////////////////////////////////////////////////////////////////

 

 

if($_POST[submitform] == "Submit") {

 

$error = "";

$num=0;

 

while($num < $tellnumber) {

$num++;

$temail = "femail"."$num";

$tname = "fname"."$num";

 

if($_POST[$tname] OR $_POST[$temail]) {

if(!$_POST[$tname]) {

$error .= "Missing Friends Name,  Friend $num<BR>";

}

if(!$_POST[$temail]) {

$error .= "Missing Friends Email,  Friend $num<BR>";

}

}

 

if($_POST[$temail]) {

if(!ereg("@",$_POST[$temail])) { $error .= "Invalid Email Address, Friend $num<BR>"; }

if(!ereg("\.",$_POST[$temail])) { $error .= "Invalid Email Address, Friend $num<BR>"; }

}

 

}

 

if(!$_POST["name"]) {

$error .= "Missing your name<BR>";

}

if(!ereg("@",$_POST)) { $error .= "Invalid Email Address<BR>"; }

if(!ereg("\.",$_POST)) { $error .= "Invalid Email Address<BR>"; }

 

if($error) {

?>

 

<BODY BGCOLOR="#ffffff">

<P><CENTER><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">

  <TR>

    <TD WIDTH="100%" BGCOLOR="#01864E">

    <TABLE WIDTH="340" BORDER="0" CELLSPACING="1" CELLPADDING="2">

      <TR>

        <TD WIDTH="26%" BGCOLOR="#01864E">

        <B><FONT COLOR="#ffffff" SIZE="-3" FACE="Verdana">Error</FONT></B></TD>

      </TR>

      <TR>

        <TD WIDTH="26%" BGCOLOR="#ffffff">

        <FONT COLOR="#000000" SIZE="-3" FACE="Verdana"><? echo $error; ?></FONT></TD>

      </TR>

    </TABLE></TD>

  </TR>

</TABLE></CENTER>

 

<?

exit();

}

 

 

    $extra ="\r\n";

          $headers = "";

          $headers .= "From: $_POST[name] <$_POST>".$extra;

          $headers .= "Reply-To: $_POST[name] <$_POST>".$extra;

          $headers .= "Return-Path: $_POST[name] <$_POST>".$extra;

          $headers .= "Message-ID: <".time()." - $_POST>".$extra;

          $headers .= "X-Mailer: PHP v".phpversion().$extra;

          $headers .= 'MIME-Version: 1.0'.$extra.$extra;

 

$num=0;

 

while($num < $tellnumber) {

$num++;

$temail = "femail".$num;

$tname = "fname".$num;

$print_f_name = $_POST[$tname];

$print_f_email = $_POST[$temail];

 

if($_POST[$temail] AND $_POST[$tname]) {

 

 

mail($print_f_email,"$subject","

Hi, $print_f_name

 

$message

 

From

$_POST[name]

 

 

",$headers);

 

 

}

 

}

 

header("Location: $thankyouurl");

exit();

 

 

} else {

 

$num=0;

while($num < $tellnumber) {

$num++;

$theboxes .= " <TR>

        <TD WIDTH=\"49%\" BGCOLOR=\"#ffffff\">

        <CENTER><B><FONT COLOR=\"#000000\" SIZE=\"-3\" FACE=\"Verdana\">$num</FONT></B></CENTER></TD>

        <TD WIDTH=\"26%\" BGCOLOR=\"#ffffff\">

        <CENTER><INPUT NAME=\"fname$num\" TYPE=\"text\" SIZE=\"-3\"></CENTER></TD>

        <TD WIDTH=\"25%\" BGCOLOR=\"#ffffff\">

        <INPUT NAME=\"femail$num\" TYPE=\"text\" SIZE=\"-3\">

</TD>

      </TR>";

}

 

 

?>

<BODY BGCOLOR="#ffffff">

<P><CENTER><FONT FACE="Verdana"><B>Tell your friend about our site</B></FONT></CENTER></P>

<FORM ACTION="tellfriend.php" METHOD="POST"><P><CENTER><TABLE BORDER="0" CELLSPACING="0"

CELLPADDING="0">

  <TR>

    <TD WIDTH="100%" BGCOLOR="#01864E">

    <TABLE WIDTH="340" BORDER="0" CELLSPACING="1" CELLPADDING="2">

      <TR>

        <TD WIDTH="26%" BGCOLOR="#01864E">

        <CENTER><B><FONT COLOR="#ffffff" SIZE="-3" FACE="Verdana">Your Poker Account</FONT></B></CENTER></TD>

        <TD WIDTH="25%">

        <CENTER><B><FONT COLOR="#ffffff" SIZE="-3" FACE="Verdana">Your Email</FONT></B></CENTER></TD>

      </TR>

      <TR>

        <TD WIDTH="150" BGCOLOR="#ffffff">

        <CENTER><INPUT NAME="name" TYPE="text" SIZE="12px"></CENTER></TD>

        <TD WIDTH="200" BGCOLOR="#ffffff">

        <INPUT NAME="email" TYPE="text" SIZE="-3">

</TD>

      </TR>

    </TABLE></TD>

  </TR>

</TABLE></CENTER></P><P><CENTER><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">

  <TR>

    <TD WIDTH="100%" BGCOLOR="#01864E">

    <TABLE WIDTH="340" BORDER="0" CELLSPACING="1" CELLPADDING="2">

      <TR>

        <TD WIDTH="49%" BGCOLOR="#01864E"></TD>

        <TD WIDTH="26%" BGCOLOR="#01864E">

        <CENTER><B><FONT COLOR="#ffffff" SIZE="-3" FACE="Verdana">Friends name</FONT></B></CENTER></TD>

        <TD WIDTH="25%">

        <CENTER><B><FONT COLOR="#ffffff" SIZE="-3" FACE="Verdana">Friends email</FONT></B></CENTER></TD>

      </TR><? echo $theboxes; ?></TABLE></TD>

  </TR>

</TABLE></CENTER></P>

<P><CENTER><INPUT NAME="submitform" TYPE="submit" VALUE="Submit"></CENTER></FORM>

<?

exit();

 

}

 

?>

</h3>

                        </td>

                                    </tr>

                                    </table></td>

                                <td width="1" bgcolor="#CCCCCC"></td>

                              </tr>

                              <tr>

                                <td height="1" colspan="3" bgcolor="#CCCCCC"></td>

                              </tr>

                            </table></td>

                          </tr>

                        </table></td>

                      </tr>

                      <tr>

                        <td height="10" align="center" valign="top"></td>

                      </tr>

                                        </table>

</td>

</tr>

</table>

</td>

                </tr>

                <tr>

                  <td align="left" height="17" valign="top" class="style19">

                   </td>

                </tr>

                <tr>

                  <td align="left" height="17" valign="top" class="style19">

                   </td>

                </tr>

              </tbody>

            </table>

            </td>

          </tr>

        </tbody>

      </table>

      </td>

    </tr>

    <tr>

      <td align="left" valign="top"> </td>

    </tr>

    <tr>

      <td align="left" valign="top">

      <table border="0" cellpadding="0" cellspacing="0" width="100%">

        <tbody>

          <tr>

            <td align="left" valign="top" width="11"><img

src="images/footer_bg_left.gif" alt="" height="120" width="11" /></td>

            <td class="footer" align="left" valign="middle">

            <table border="0" cellpadding="0" cellspacing="0"

width="100%">

              <tbody>

                <tr>

                  <td style="padding-left: 12px;" align="left"

valign="top" width="260"><img src="images/footer_img.gif" alt=""

height="110" width="249" /></td>

                  <td align="left" valign="middle">

                  <table border="0" cellpadding="0" cellspacing="0"

width="100%">

                    <tbody>

                      <tr>

                        <td class="footer_border" align="left"

valign="top"> <a href="index.php">Homea> | <a href="#">Terms

& Conditions</a> | <a href="#"> Privacy Policy</a> | <a href="#">Site

Map</a> | <a href="#">Contact Us</a></td>

                      </tr>

                      <tr>

                        <td class="footer_border"

style="font-size: 10px; line-height: 22px;" align="left" valign="top">ReturnTheRake.com

Copyright © 2010, All Rights Reserved.</td>

                      </tr>

                    </tbody>

                  </table>

                  </td>

                </tr>

              </tbody>

            </table>

            </td>

            <td align="left" valign="top" width="11"><img

src="images/footer_bg_right.gif" alt="" height="120" width="11" /></td>

          </tr>

        </tbody>

      </table>

      </td>

    </tr>

    <tr>

      <td align="left" valign="top"> </td>

    </tr>

  </tbody>

</table>

<br />

</body>

</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.