PHP newbie help

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&nbsp;
<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:
ok well i've decided to go with the mailto option, only thing now is that when the person clicks submit and it loads up there emails, the email isn't very readable in that it looks like this:

Name=hello&landline=0111124545&mobile=53456454&Address1=123+Fake+Street&week%5B%5D=Once+a+week&days%5B%5D=Tuesday&requierment=nope&found=google


Is there anyway i can make this a little nicer so that when it gets sent to me i can easily read it?





this isn't needed too much, but also is there anyway to make it so that once the email is sent it clears the form?
 
bascialy the best/easiest way for the customer to submit the forms, and then the best way for me to see the forms. If it looks ugly only for me its not a problem, but it its anoying for the customer obbviosuly thats not a good idea. I have no clue which is the best method for this, any as long as they give me what i want above
 
Back
Top Bottom