Soldato
- Joined
- 12 Feb 2006
- Posts
- 17,427
- Location
- Surrey
well have read an online tutorial to teach me a quick rough guide to php as i have nearly finished my website and a small amount of php what i need to know. though it is only a small amount of php i need this is not easy and i'm having to turn to ocuk for the help for now until i get mroe time next week to learn php
what im hoping is if someone could bascially just fill me in on what i need to be putting, or atleast a rough guide on what needs to be done.
So far i have a contact page and a book online page on my website, which are bascially the same thing except slightly different questions are asked, they both have around 6 questions, like name, email, telephone, enquiry etc.
this is the html i got for the contact page form:
<form name="contactform" method="post" action="contact.php" >
<tr>
<td width="38%" valign="top" class="text7"><p><b>Name :</b></p></td>
<td width="62%" valign="top" bgcolor="#FFFFFF"><input type="text" name="name" style="width:300px"></td>
</tr>
<tr>
<td valign="top" class="text7"><p><b>Email Address :</b></p></td>
<td valign="top" bgcolor="#FFFFFF"><input type="text" name="email" style="width:300px"></td>
</tr>
<tr>
<td valign="top" class="text7"><p><b>Phone :</b></p></td>
<td valign="top" bgcolor="#FFFFFF"><input type="text" name="phone" style="width:300px"></td>
</tr>
<tr>
<td valign="top" class="text7"><p><b>Enquiry :</b></p></td>
<td valign="top" bgcolor="#FFFFFF"><textarea name="enquiry" style="width:300px" rows="5" cols="20"></textarea></td>
</tr>
<tr>
<td align="left" valign="top" ><p class="text7"><b>Prefered method of contact:</b></p></td>
<td>
<input type="checkbox" name="contact" value="phone">
Telephone
<input type="checkbox" name="contact" value="email">
Email</p></td>
</td>
</tr>
<br>
<br>
<tr>
<td colspan="2" bgcolor="#FFFFFF" align="center"><input type="submit" name="submit_contact" value="Submit" onClick="javascript:return check2();"></td>
</tr>
</form>
this im hoping would send the info to a php file called contact?
and on that page i have only
<html>
<body>
Name: <?php echo $_POST["name"]; ?>.<br />
Email Address: <?php echo $_POST["email"]; ?>.
Phone: <?php echo $_POST["phone"]; ?>.
Enquiry: <?php echo $_POST["enquiry"]; ?>.
Prefered Method of Conact: <?php echo $_POST["contact"]; ?>.
</body>
</html>
i know what i have done must be compltelty wrong which is why im here for the help now so i can get this site up and running tonight, and then i learn php next week.
Only other thing im thinking i could do would just do a mailto instead which would make it much easier. the only reason im not is because i don't like how to submit a form you have to load up outlook express so if it was me i would just leave the form and not bother which im guessing customers would aswell, maybe not all the time but sometimes. am i wrong about this?
finally if not php is there another alternative that will bascially just save the form information onto a page that only i can get to and not the public that would be simple?
what im hoping is if someone could bascially just fill me in on what i need to be putting, or atleast a rough guide on what needs to be done.
So far i have a contact page and a book online page on my website, which are bascially the same thing except slightly different questions are asked, they both have around 6 questions, like name, email, telephone, enquiry etc.
this is the html i got for the contact page form:
<form name="contactform" method="post" action="contact.php" >
<tr>
<td width="38%" valign="top" class="text7"><p><b>Name :</b></p></td>
<td width="62%" valign="top" bgcolor="#FFFFFF"><input type="text" name="name" style="width:300px"></td>
</tr>
<tr>
<td valign="top" class="text7"><p><b>Email Address :</b></p></td>
<td valign="top" bgcolor="#FFFFFF"><input type="text" name="email" style="width:300px"></td>
</tr>
<tr>
<td valign="top" class="text7"><p><b>Phone :</b></p></td>
<td valign="top" bgcolor="#FFFFFF"><input type="text" name="phone" style="width:300px"></td>
</tr>
<tr>
<td valign="top" class="text7"><p><b>Enquiry :</b></p></td>
<td valign="top" bgcolor="#FFFFFF"><textarea name="enquiry" style="width:300px" rows="5" cols="20"></textarea></td>
</tr>
<tr>
<td align="left" valign="top" ><p class="text7"><b>Prefered method of contact:</b></p></td>
<td>
<input type="checkbox" name="contact" value="phone">
Telephone
<input type="checkbox" name="contact" value="email">
Email</p></td>
</td>
</tr>
<br>
<br>
<tr>
<td colspan="2" bgcolor="#FFFFFF" align="center"><input type="submit" name="submit_contact" value="Submit" onClick="javascript:return check2();"></td>
</tr>
</form>
this im hoping would send the info to a php file called contact?
and on that page i have only
<html>
<body>
Name: <?php echo $_POST["name"]; ?>.<br />
Email Address: <?php echo $_POST["email"]; ?>.
Phone: <?php echo $_POST["phone"]; ?>.
Enquiry: <?php echo $_POST["enquiry"]; ?>.
Prefered Method of Conact: <?php echo $_POST["contact"]; ?>.
</body>
</html>
i know what i have done must be compltelty wrong which is why im here for the help now so i can get this site up and running tonight, and then i learn php next week.
Only other thing im thinking i could do would just do a mailto instead which would make it much easier. the only reason im not is because i don't like how to submit a form you have to load up outlook express so if it was me i would just leave the form and not bother which im guessing customers would aswell, maybe not all the time but sometimes. am i wrong about this?
finally if not php is there another alternative that will bascially just save the form information onto a page that only i can get to and not the public that would be simple?
Last edited: