Getting input from a 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
winsonlee
Forum Commoner
Posts: 76
Joined: Thu Dec 11, 2003 8:49 pm

Getting input from a form

Post by winsonlee »

How can i make a php file and get the following input from the form ??

Code: Select all

blog.html


<form method=POST action="post.php">
TITLE : <input type="text" name="title" style="width:300;">
<textarea name="yourFieldNameHere" style="width:800; height:150">
</textarea><br>
<input type="submit" name="submit" value="SUBMIT">
</form>
User avatar
Lord Sauron
Forum Commoner
Posts: 85
Joined: Tue Apr 20, 2004 5:53 am
Location: Tilburg, NL

Millions of example

Post by Lord Sauron »

Hi there,

There are millions of examples to be found on the Web (including this forum), how this can be done. So, you could have made a little more efforts before posting this question.

But anyway; you can post your variables (which are the names of the input fields) by means of the ACTION-command.

ACTION=\"post.php?title=$title&fieldName=$yourFieldNameHere\"
Last edited by Lord Sauron on Wed May 19, 2004 8:23 am, edited 1 time in total.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

mortz
Forum Newbie
Posts: 10
Joined: Wed May 19, 2004 4:23 am
Location: Norway

Post by mortz »

Code: Select all

$title = $_POST['title'];
and so on..
Post Reply