Jump to content
Killersites Forums

realmainer

Member
  • Posts

    18
  • Joined

  • Last visited

Everything posted by realmainer

  1. realmainer

    Php Form

    okay here are 2 of the 4 switches I put the closing } and I get the error on each line I put that closing } There has to be another reason why. switch($_POST['rgroup3']) { case "rg3v1": $value3 = "Radio Group 3 - Value 1 was selected."; break; case "rg3v2": $value3 = "Radio Group 3 - Value 2 was selected."}; switch($_POST['rgroup4']) { case "rg4v1": $value4 = "Radio Group 4 - Value 1 was selected."; break; case "rg4v2": $value4 = "Radio Group 4 - Value 2 was selected."};
  2. realmainer

    Php Form

    If I put a "}" anywhere on those switch statements I get any error. So I am at a lost as to were you think they need be
  3. realmainer

    Php Form

    I get this Parse error: syntax error, unexpected $end in /home/realmai1/public_html/whitetaildeerpool.com/survey.php on line 87 There is nothing on line 87 but on line 68 is a red mark see photo Here is the code again <?php /* Email Variables */ $emailSubject = 'survey!'; $webMaster = 'realmainer@gmail.com'; /* Data Variables */ $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $state = $_POST['state']; switch($_POST['rgroup1']) { case "rg1v1": $value = "Radio Group 1 - Value 1 was selected."; break; case "rg1v2": $value = "Radio Group 1 - Value 2 was selected."; switch($_POST['rgroup2']) { case "rg2v1": $value2 = "Radio Group 2 - Value 1 was selected."; break; case "rg2v2": $value2 = "Radio Group 2 - Value 2 was selected."; switch($_POST['rgroup3']) { case "rg3v1": $value3 = "Radio Group 3 - Value 1 was selected."; break; case "rg3v2": $value3 = "Radio Group 3 - Value 2 was selected."; switch($_POST['rgroup4']) { case "rg4v1": $value4 = "Radio Group 4 - Value 1 was selected."; break; case "rg4v2": $value4 = "Radio Group 4 - Value 2 was selected."; $comments = $_POST['comments']; echo $value; echo $value2; echo $value3; echo $value4; $body = <<<EOD <br><hr><br> Name: $fname <br> Name: $lname <br> Email: $email <br> State: $state <br /> comments: $comments <br> Comments: $comments <br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); ?> /* Results rendered as HTML */ <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="2;URL=http://www.whitetaildeerpool.com"> --> </style> </head> <div align="center">thank you for filling out our form !</div> </div> </body> </html>
  4. realmainer

    Php Form

    I have been working to figure this out. Here are the 2 pages I have The form and PHP page but I can not get it too work can someone tell me what I did wrong? <form method="post" name="form1" id="form1" action="survey.php"> <p> <label>First Name <input type="text" name="fname" id="fname" /> </label> </p> <p> <label>Last Name <input type="text" name="lname" id="lname" /> </label> </p> <p> <label>Email <input type="text" name="email" id="email" /> </label> </p> <p> <label>What state you from? <input type="text" name="state" id="state" /> </label> </p> <p> <label> Would you like to see a nation wide pool? Winner by antler size.<br /> <input type="radio" name="rgroup1" value="rg1v1"> yes <input type="radio" name="rgroup1" value="rg1v2"> no </label> </p> <p> <label> Would you like to see a Maine State wide pool? Winner by weight.<br /> <input type="radio" name="rgroup2" value="rg2v1"> yest <input type="radio" name="rgroup2" value="rg2v2"> no </label> </p> <p> <label> Would you like to see a Sanford Maine local pool? Winner by weight. All deer would be put on the same scale in Sanford. <br /> <input type="radio" name="rgroup3" value="excellent"> yes <input type="radio" name="rgroup3" value="good"> no </label> </p> <p> <label> Would you be willing to pay $10.00 for the Nation wide pool? <br /> <input type="radio" name="rgroup4" value="excellent"> yes <input type="radio" name="rgroup4" value="good"> no </label> <br /> </p> <p> <label>Comments <br /> <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </label> </p> <p> <input name="submit" type="submit" class="buttons" id="submit" value="Send" /> </p> </form> Now the PHP page <?php /* Email Variables */ $emailSubject = 'survey!'; $webMaster = 'realmainer@gmail.com'; /* Data Variables */ $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $comments = $_POST['comments']; $body = <<<EOD <br><hr><br> Name: $fname <br> Name: $lname <br> Email: $email <br> Comments: $comments <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 <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="2;URL=http://www.whitetaildeerpool.com/.html"> --> </style> </head> <div align="center">thank you for filling out our form !</div> </div> </body> </html> EOD; echo "$theResults"; ?>
  5. I am working in dreamweaver and see I have on line 79 a red error. I am lost as to what I need there
  6. I have been watching videos and have not found anything yet that can help me to get radio group to work See my code and see if you can help me. I have tried different things I put XXXX in were I thing I need some thing I also think I need something in the first line were the form starts <form method="post" name="form1" id="form1" action="survey.php"> <p> <label>First Name <input type="text" name="fname" id="fname" /> </label> </p> <p> <label>Last Name <input type="text" name="lname" id="lname" /> </label> </p> <p> <label>Email <input type="text" name="email" id="email" /> </label> </p> <p> <label>What state you from? <input type="text" name="state" id="state" /> </label> </p> <p> <label> Would you like to see a nation wide pool? Winner by antler size.<br /> <input type="radio" name="RadioGroup1" value="yes" id="RadioGroup1_0" /> yes</label> <br /> <label> <input type="radio" name="RadioGroup1" value="no" id="RadioGroup1_1" /> no</label> </p> <p> <label> Would you like to see a Maine State wide pool? Winner by weight.<br /> <input type="radio" name="RadioGroup2" value="yes" id="RadioGroup2_0" /> yes</label> <br /> <label> <input type="radio" name="RadioGroup2" value="no" id="RadioGroup2_1" /> no</label> </p> <p> <label> Would you like to see a Sanford Maine local pool? Winner by weight. All deer would be put on the same scale in Sanford. <br /> <input type="radio" name="RadioGroup3" value="yes" id="RadioGroup3_0" /> yes</label> <br /> <label> <input type="radio" name="RadioGroup3" value="no" id="RadioGroup3_1" /> no</label> </p> <p> <label> Would you be willing to pay $10.00 for the Nation wide pool? <br /> <input type="radio" name="RadioGroup4" value="yes" id="RadioGroup4_0" /> yes</label> <br /> <label> <input type="radio" name="RadioGroup4" value="no" id="RadioGroup4_1" /> no</label> <br /> </p> <p> <label>Comments <br /> <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </label> </p> <p> <input name="submit" type="submit" class="buttons" id="submit" value="Send" /> </p> </form> <!--ends form--> This PHP below is in a external file <?php /* Email Variables */ $emailSubject = 'survey!'; $webMaster = 'realmainer@gmail.com'; /* Data Variables */ $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; XXXXXXXXXXXXXXXXXXXXX I think I need something here for each group I have XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX $comments = $_POST['comments']; $body = <<<EOD <br><hr><br> Name: $fname <br> Name: $lname <br> Email: $email <br> Comments: $comments <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 <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="2;URL=http://www.whitetaildeerpool.com"> --> </style> </head> <div align="center">thank you for filling out our form !</div> </div> </body> </html> EOD; echo "$theResults"; ?>
  7. realmainer

    Php Form

    yes i did And I am going over it again.
  8. realmainer

    Php Form

    Yes it sound simple. But my server told me I need it to be a php. That is were I am ost. As I can not figure out how to get the php to work with the form
  9. realmainer

    Php Form

    I bought complete web programming. I have been watching the videos and need to know what I missed. I am trying to get a survey form to work. My host place tells me I have to have it in php. I have been trying to see what video shows it to me. Can anyone tell me which one. I have watched all the php ones and did not see it.
  10. Hi Stefan I think I am alset. I re installed it and it is working now. That is wierd that the other pages worked but not the main page. But it works now so thanks for the help
  11. Not certain what page you want me to send. Do you want the setting page for chrome?
  12. Okay I tried it in firefox. and it still does not work. Can you or anyone tell me how to fix this?
  13. Yes that is right all of them work put the index page.
  14. Yes it is running as I can go to the other pages.
  15. Yes I did add it to the root here is a bigger picture.
  16. I am having trouble with getting my wampserver locathost page to load all that comes up is see picture
×
×
  • Create New...