Welcome to Truecodeing.tk plz join are other site TrueGamerz.tk
Site admin Dirty_Tazer & Bman24 & Snick458 & Always_Jonezen have any questions ask a admin or a mod
Welcome to Truecodeing.tk plz join are other site TrueGamerz.tk
Site admin Dirty_Tazer & Bman24 & Snick458 & Always_Jonezen have any questions ask a admin or a mod
Would you like to react to this message? Create an account in a few clicks or log in to continue.


TrueGamerz.tk
 
HomeHomeGallerySearchLatest imagesRegisterLog in
We have a new site that's a vbulliten join TrueGamerz.Tk
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
Xx...Tazer...xX (1239)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
bman24 (247)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
Always_Jonezen (155)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
Navy-Hawk (121)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
qwerty (91)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
CjZitical (91)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
snick458 (80)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
MAG (77)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
»Air Bourne« (76)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
.-jZeIvIiiX-. (73)
[TuT] Contact form using HTML/PHP I_vote_lcap[TuT] Contact form using HTML/PHP I_voting_bar[TuT] Contact form using HTML/PHP I_vote_rcap 
Latest topics
» Socom FTB3 USA Gamesave 100% Complete
[TuT] Contact form using HTML/PHP I_icon_minitimeSun Dec 29, 2013 7:31 pm by pandemic44

» Making a scantime crypter - VB.net
[TuT] Contact form using HTML/PHP I_icon_minitimeWed Aug 15, 2012 7:01 am by shayl

» VERY IMPORTANT !!!!!!!!!!
[TuT] Contact form using HTML/PHP I_icon_minitimeFri Mar 09, 2012 9:34 pm by kfederigan

» my FTB3 gamesave request
[TuT] Contact form using HTML/PHP I_icon_minitimeTue Oct 25, 2011 2:39 pm by The.S.Man

» How To Install Pspsdk (PRX Compiler)
[TuT] Contact form using HTML/PHP I_icon_minitimeThu Aug 04, 2011 3:47 pm by xUnD3ADxMARIN3x

» Hope's
[TuT] Contact form using HTML/PHP I_icon_minitimeFri Jul 15, 2011 3:51 pm by nemopsp

» Offline Guns Online No Need Gamesaves!
[TuT] Contact form using HTML/PHP I_icon_minitimeWed Apr 20, 2011 3:08 pm by jeshuag

» Need Game Save Please
[TuT] Contact form using HTML/PHP I_icon_minitimeMon Apr 18, 2011 8:15 am by guy mandude

» my gsave request
[TuT] Contact form using HTML/PHP I_icon_minitimeSun Apr 10, 2011 12:57 pm by Killin

Who is online?
In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests

None

Most users ever online was 120 on Tue May 14, 2019 3:05 pm
Statistics
We have 826 registered users
The newest registered user is netanter

Our users have posted a total of 3902 messages in 2169 subjects
Poll
Do you like too shop online??
Yes
[TuT] Contact form using HTML/PHP I_vote_lcap25%[TuT] Contact form using HTML/PHP I_vote_rcap
 25% [ 14 ]
no
[TuT] Contact form using HTML/PHP I_vote_lcap25%[TuT] Contact form using HTML/PHP I_vote_rcap
 25% [ 14 ]
Don't have credit card
[TuT] Contact form using HTML/PHP I_vote_lcap51%[TuT] Contact form using HTML/PHP I_vote_rcap
 51% [ 29 ]
Total Votes : 57
HITS
HTML Hit Counter
Web Counter
facebook
truecodeing

truecodeing

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
May 2024
SunMonTueWedThuFriSat
   1234
567891011
12131415161718
19202122232425
262728293031 
CalendarCalendar
Search
 
 

Display results as :
 
Rechercher Advanced Search
Affiliates
 
Social bookmarking
Social bookmarking reddit      

Bookmark and share the address of Truecodeing on your social bookmarking website

Bookmark and share the address of on your social bookmarking website
Music playlist

MusicPlaylist
Music Playlist at MixPod.com

 

 [TuT] Contact form using HTML/PHP

Go down 
AuthorMessage
Xx...Tazer...xX
Owner
Owner
Xx...Tazer...xX


Posts : 1239
T®ue Points : 1102678
T®ue Reputation : 40
Join date : 2009-09-02
Age : 31
Location : Chicago,Illinois

[TuT] Contact form using HTML/PHP Empty
PostSubject: [TuT] Contact form using HTML/PHP   [TuT] Contact form using HTML/PHP I_icon_minitimeTue May 18, 2010 5:20 pm

This is my first post so I thought I'd share my tutorial.
Welcome!

First of all let me start by saying PHP is a server side language, meaning it will not work (or even look right) if not run on a live server.

Okay let's get this moving.

So this is going to be really basic and probably not the best type of contact form. But it works and it's good experience.
We will have two documents, one HTML (the actual form) and two, the PHP (the one that performs the tasks).

The HTML:
Start by putting together all the necessary parts of you HTML document, then in the tag, add:

Code:

The form tag also needs to contain the referance to the PHP document, and the method being used.
Use the attributes "action", to refer to the PHP document, and "method". ("post" is the smarter decision because it is generally safer to use)


Code:

Don't worry about the PHP yet, we'll get to that.

In our form, we are going to add the inputs.
-Name:
-Email:
-Comment:

To do this we use the "input" tags, there are many different types of inputs but we will be using text, textarea, and submit. (though textarea does not actually use the input tag)
The attributes used are "type" "size" and "name".

"name" specifies a name for an input element, basically almost the same as giving a class or id to a div in CSS.

"size" is obvious, specifies the width of an input field. You can use numbers to distinguish this.

Make two inputs, one for people to enter their name, and one for their email.
It should look something like this:

Code:

Name:

Email:

Now we need an area for the person to enter their comments or concerns.
The tag used to do this is

Now all this HTML form needs is a submit button.
The input type is "submit" and this will create you a nice little button.
The only attribute used besides type is value.
This will determine the text on the actual button.


Code:


So close your tag and the HTML is done.

The PHP.
Create a new PHP document and name it "send.php".
*remember to reference the exact file name in your HTML so this works*
Everything will be explained in the comments on the document.


Code:

$name = $_POST['name']; //this is where the value of your inputs go
$email = $_POST['email']; //value of your email input goes here
$message = $_POST['comments']; //value of your textarea goes here
$type = $_POST['type'];
$to = "youremailhere@coolkids.com"; //put your email here so it sends to your email

mail($to, "Feedback Results", $message, "From:$email"); // you can edit these, these are what your email message will tell you as the subject.

header("Location:thankyou.html"); //this refers to another HTML page which you don't need but is nice to have, it will send you to a page after submitting and is kind of convenient


?>
Make sure both your documents are in the same directory, or just make sure you link them correctly.
You can download both of my documents for referance to help guide you along if needed.
I hope this was somewhat helpful, sorry if I made a mistake or missed anything.
I tried to do this as efficient as possible, if you need help or want to request any other tutorials PM me and I'll be glad to
Back to top Go down
https://truecodeing.forumotion.net
 
[TuT] Contact form using HTML/PHP
Back to top 
Page 1 of 1
 Similar topics
-
» How to Create a Simple Html Page
» My Html Popup Music Jukebox Project
» Changing Forumotion Footer (This requires a bit of knowledge of html/css)

Permissions in this forum:You cannot reply to topics in this forum
 :: Computer section :: Visual basic :: HTML-
Jump to:  
Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com