Jump to content

kahuna

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by kahuna

  1. Hi rwwd, thanks for your help ive encountered another two problems tho,on the output below the part where it says how often do you go to the gym its printing array, when its should print often or one of the other choices and when i got to email the answers form to myself it doesnt use the email entered instead it prints out $Email in the address bar any ideas(<form action='mailto:'$Email'?subject=user comments' method='post'enctype='text/plain'>)this is the code im using to send the email idName: qwe<br> Firstname: qwe<br> Surname: asd<br> Address: asd<br> Email: example@hotmail.ie<br> Phone no: 124-456-1234<br> Your fitness level: Above Average<br> How often do you go to the gym: once<br> Why do you go to the Gym: Array<br>
  2. hi im trying to display the form entities in the textarea field so they can be sent to the user in an email, but its not working properly it prints out the variable $idName instead of its value?? any help would be greatly appricated ive been stuck on this bit of ages <?php function display_output_page() { $idName = trim($_REQUEST['username']); $firstName = trim($_REQUEST['firstname']); $Surname = trim($_REQUEST['surname']); $Address = trim($_REQUEST['address']); $Email = trim($_REQUEST['email']); $Phone = trim($_REQUEST['phone']); $Fitness = isset($_REQUEST['fitness']) ? $_REQUEST['fitness'] : ''; $goGym = isset($_REQUEST['gogym']) ? $_REQUEST['gogym'] : ''; $whyGym = isset($_REQUEST['whyGym']) ? $_REQUEST['whyGym']: array(); ?> <html> <head><title>Form Results</title></head> <body> <h1>Form Results</h1> <form action='mailto:$Email?subject=user comments' method='post'enctype='text/plain'> <textarea name='Topic' rows=15 cols=90> idName: ". $idName\n; Firstname: ". $_POST["firstname"]\n; Surname: ". $_POST["surname"]\n; Address: ". $_POST["address"]\n; Email: ". $_POST["email"]\n; Phone no.: ". $_POST["phone"]\n; Your fitness level: ". $_POST["fitness"]\n; How often do you go to the gym: ". $_POST["goGym"]\n; Why do you go to the Gym: ". $_POST["whyGym"]; </textarea></br> <input type='submit' value='Send Thru Email'> </form> </body> </html> <?php } ?>
  3. Hi im new to this site so i hope this is in the right place,my table goes green when i try to say less than 14 but when i use greater the code looks ok ,its works by itself but im using five similar else if statements for different ages(teacher doesnt want functions used yet) can anyone please help ??? else if($myAge >9 || $myage <14) { echo"<table width='500' border='0' cellpadding='0' cellspacing='1' bgcolor='#CCCCCC'>"; echo"<tr>"; echo"<td>"; echo"<table width='100%' border='0' cellpadding='3' cellspacing='1' bgcolor='#FFFFFF'>"; echo"<tr>"; echo"<td colspan='3'><h3><strong>Sports Catagory</h3></strong></td>"; echo"</tr>"; echo"<tr>"; echo"<td><hr></td>"; echo"</tr>"; echo"<tr>"; echo"<td> ".$username." a-zA-z</td>"; echo"</tr>"; echo"<tr>"; echo"<td> ".$password." 0-9</td>"; echo"</tr>"; echo"<tr>"; echo"<td>Invalid data entered, please re-enter the data correctly</td>"; echo"</tr>"; echo"<tr>"; echo"</tr>"; echo "<tr>"; echo "<td><a href = '".$self."'> Back to Form </a></td>"; echo "</tr>"; echo "</table>"; echo"</td>"; echo"</tr>"; echo"</table>"; }
×
×
  • 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.