contact form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
evropa
Forum Newbie
Posts: 3
Joined: Sun Nov 06, 2005 2:22 pm

contact form

Post by evropa »

feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


created this contact form, but i need to include the actual php code. how could i go on about doing it?

i would like the user to select a name from the drop down menu and have it sent to the specified email.

Code: Select all

<td width="484" height="466" valign="top"><form action="" method="post" name="form1" class="formq" id="form1">
Please use the contact form below to reach any of Liberty High Schools staff members. All fields should be filled in to the best of your knowledge.<br />
<br />
(<span class="req">*</span>)=Required Fields<br />
<br /> 
First name <span class="req">*</span> <br />
<input name="firstname" type="text" class="input" id="firstname" size="35" maxlength="20" />
<br />
<br />
Last Name<span class="req"> *</span><br />
<input name="lastname" type="text" class="input" id="lastname" size="35" maxlength="20" />
<br />
<br />
Email Address <span class="req">*</span><br />
<input name="emailaddress" type="text" class="input" id="emailaddress" size="35" maxlength="20" />
<br />
<br />
Please select a staff members name below<br />
<select name="staff" class="input" id="staff">
<option value="none"><Select></option>
<option value="WKA562@interact.ccsd.net">Wendy, Abney</option>
<option value="RAA540@interact.ccsd.net">Roxanne, Albertson</option>
<option value="XSA565@interact.ccsd.net">Xavier, Antheaume</option>
<option value="eaaslin@interact.ccsd.net">Elicia, Aslin</option>
<option value="HCA565@interact.ccsd.net">Harmony, Ayala</option>
<option value="WMB565@interact.ccsd.net">Wanda, Babcock</option>
<option value="NLBakko@interact.ccsd.net">Nicki, Bakko-Toliver</option>
</select>
<span class="req"> *</span><br />
<br />
Comments <span class="req">*</span><br />
<textarea name="comments" cols="35" rows="4" class="input" id="comments"></textarea>
<br />
<br />
<input name="submit" type="image" id="submit" value="Submit" src="images/submit2.png" />
&nbsp;
<input name="reset" type="image" id="reset" value="Submit" src="images/reset2.PNG" />
<br />
</form></td>

feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

Why don't you take it nice and slowly and try some simpler stuff first. The PHP Manual has a great beginner intro.
evropa
Forum Newbie
Posts: 3
Joined: Sun Nov 06, 2005 2:22 pm

Post by evropa »

i learn better when someone shows me how its done, then i attempt to edit it to my preferences, look at other examples. thats the way i began html/css and in less then 3 weeks i know more then i thought i ever would. if you could point me to some video tutorials, similar examples or just show me me hows its done step by step it would be much appreciated.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

HTML/CSS (which is a markup language) and PHP (which is a programming language), are two different things. However, I learned PHP by editing too. Eventually, what you'll want to do is sit down and read the entire manual to get a handle of all the possible syntax, but for now...

Ask yourself two questions:

1. How do I get the variables sent by the contact form?
2. How do I email people?

Now... do your research.
Post Reply