Jump to content

Recommended Posts

Okay I really need help...I am using dreamweaver CS4 I have created a form using the spry tools I then created a seperate html file with the php code...I have two other forms on my site that work fine. So I took the original form that works and renamed the $_POST fields and the other fields to the new questions. I am VERY VERY new at this and have NO idea what I am doing. BUT I did this with my second form and it worked so I thought I had it down...SO when I fill the form out it and click submit it doesn't send to my email like the others. and it has some of the code on my thank you page. (After you click submit it suppose to go to a thank you page which it does but at the top it has part of the PHP code). HERE is my site... www.supernaturalsolutions.org

 

Click on Accepting Member Applications and fill out the form...you will see what I mean.

 

I get this code:

How did you hear about us?: $hear <br>

Name: $name <br>

Email: $email <br>

Contact Number: $contact <br>

Do you have Myspace?: $myspace <br>

What's your url or display name?: $url <br>

Are you at least 21?: $atleast <br>

Age: $age <br>

Are you available Saturday nights?: $availalbe <br>

Willing to review evidence?: $evidence <br>

Do you have any felonies?: $feloney <br>

Willing to pay membership fee?: $fee <br>

What religion are you?: $religion <br>

You ok with other memebers being different?: $diverse <br>

Do you believe in ghosts?: $believe <br>

Why do you want to be an investigator?: $investigator <br>

What can you bring to our team?: $bring <br>

What job would you like?: $job <br>

What religion are you?: $religion <br>

What are your fears?: $fears <br>

Ok with attending meetings?: $meetings <br>

Any place you want to invesitgate: $place <br>

Have you investigated in the past?: $past <br>

Please explain: $explain <br>

Ever experienced paranormal phenomena in your past?: $experienced <br>

Please explain: $explain2 <br>

EOD;

 

$headers = "From: $email\r\n";

    $headers .= "Content-type: text/html\r\n";

    $success = mail($webMaster, $emailSubject, $body, $headers);

   

/* Results rendered as HTML */

 

 

$theResults = <<<EOD

on the top of the page and then my thank you page is underneath that and no email.

 

Here is the PHP code I am using that isn't working:

 

<?php

 

/* Subject and Email Variables */

 

$emailSubject = 'Request An Investigation';

    $webMaster = 'tiffany@supernaturalsolutions.org';

   

/* Gathering Data Variables */

 

$hear = $_POST['hear'];

    $name = $_POST['name'];

    $email = $_POST['email'];

    $contact = $_POST['contact'];

    $myspace = $_POST['myspace'];

    $url = $_POST['url'];

    $atleast = $_POST['atleast'];

    $age = $_POST['age'];

    $available = $_POST['available'];

    $evidence = $_POST['evidence'];

    $feloney = $_POST['feloney'];

    $fee = $_POST['fee'];

    $religion = $_POST['religion'];

    $diverse = $_POST['diverse'];

    $believe = $_POST['believe'];

    $investigator = $_POST['investigator'];

    $bring = $_POST['bring'];

    $job = $_POST['job'];

    $fears = $_POST['fears'];

    $meetings = $_POST['meetings'];

    $place = $_POST['place'];

    $past = $_POST['past'];

    $explain = $_POST['explain'];

    $experienced = $_POST['experienced'];

    $explain2 = $_POST['explain2'];

   

$body = <<<EOD

<br><hr><br>

How did you hear about us?: $hear <br>

Name: $name <br>

Email: $email <br>

Contact Number: $contact <br>

Do you have Myspace?: $myspace <br>

What's your url or display name?: $url <br>

Are you at least 21?: $atleast <br>

Age: $age <br>

Are you available Saturday nights?: $availalbe <br>

Willing to review evidence?: $evidence <br>

Do you have any felonies?: $feloney <br>

Willing to pay membership fee?: $fee <br>

What religion are you?: $religion <br>

You ok with other memebers being different?: $diverse <br>

Do you believe in ghosts?: $believe <br>

Why do you want to be an investigator?: $investigator <br>

What can you bring to our team?: $bring <br>

What job would you like?: $job <br>

What religion are you?: $religion <br>

What are your fears?: $fears <br>

Ok with attending meetings?: $meetings <br>

Any place you want to invesitgate: $place <br>

Have you investigated in the past?: $past <br>

Please explain: $explain <br>

Ever experienced paranormal phenomena in your past?: $experienced <br>

Please explain: $explain2 <br>

EOD;

 

$headers = "From: $email\r\n";

    $headers .= "Content-type: text/html\r\n";

    $success = mail($webMaster, $emailSubject, $body, $headers);

   

/* Results rendered as HTML */

 

 

$theResults = <<<EOD

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Thank you</title>

<style type="text/css">

<!--

body,td,th {

font-family: Georgia;

font-size: 16px;

color: #00C;

}

body {

background-color: #000;

background-image: url(Images/ForestRoad-in-Fogdark.png);

}

-->

</style>

<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>

</head>

 

<body>

<table width="800" border="0" align="center">

  <tr>

    <td width="350" align="center" valign="top"><p> </p>

    <p>

      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="350" height="250" id="FlashID" title="LogoStar">

        <param name="movie" value="Images/logostars.swf" />

        <param name="quality" value="high" />

        <param name="wmode" value="transparent" />

        <param name="swfversion" value="6.0.65.0" />

        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don�t want users to see the prompt. -->

        <param name="expressinstall" value="Scripts/expressInstall.swf" />

        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

        <!--[if !IE]>-->

        <object type="application/x-shockwave-flash" data="Images/logostars.swf" width="350" height="250">

          <!--<![endif]-->

          <param name="quality" value="high" />

          <param name="wmode" value="opaque" />

          <param name="swfversion" value="6.0.65.0" />

          <param name="expressinstall" value="Scripts/expressInstall.swf" />

          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

          <div>

            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

          </div>

          <!--[if !IE]>-->

        </object>

        <!--<![endif]-->

      </object>

    </p>

    <p> </p>

    <p> </p>

    <p>

      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="85" height="140" id="FlashID2" title="HomeButton">

        <param name="movie" value="Images/Home.swf" />

        <param name="quality" value="high" />

        <param name="wmode" value="transparent" />

        <param name="swfversion" value="6.0.65.0" />

        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don�t want users to see the prompt. -->

        <param name="expressinstall" value="Scripts/expressInstall.swf" />

        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

        <!--[if !IE]>-->

        <object type="application/x-shockwave-flash" data="Images/Home.swf" width="85" height="140">

          <!--<![endif]-->

          <param name="quality" value="high" />

          <param name="wmode" value="opaque" />

          <param name="swfversion" value="6.0.65.0" />

          <param name="expressinstall" value="Scripts/expressInstall.swf" />

          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

          <div>

            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

          </div>

          <!--[if !IE]>-->

        </object>

        <!--<![endif]-->

      </object>

    </p></td>

    <td width="440" align="center" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="455" height="450" id="FlashID3" title="thankyou">

      <param name="movie" value="Images/thankyoumember.swf" />

      <param name="quality" value="high" />

      <param name="wmode" value="transparent" />

      <param name="swfversion" value="6.0.65.0" />

      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don�t want users to see the prompt. -->

      <param name="expressinstall" value="Scripts/expressInstall.swf" />

      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

      <!--[if !IE]>-->

      <object type="application/x-shockwave-flash" data="Images/thankyoumember.swf" width="455" height="450">

        <!--<![endif]-->

        <param name="quality" value="high" />

        <param name="wmode" value="transparent" />

        <param name="swfversion" value="6.0.65.0" />

        <param name="expressinstall" value="Scripts/expressInstall.swf" />

        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

        <div>

          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

        </div>

        <!--[if !IE]>-->

      </object>

      <!--<![endif]-->

    </object></td>

  </tr>

</table>

<script type="text/javascript">

<!--

swfobject.registerObject("FlashID");

swfobject.registerObject("FlashID2");

swfobject.registerObject("FlashID3");

//-->

</script>

</body>

</html>

EOD;

echo "$theResults";

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/161885-solved-php-form-help-for-dummies/
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.