How to post text submited in a form.

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
border20
New php-forum User
New php-forum User
Posts: 32
Joined: Tue Jan 28, 2003 10:19 am
Location: Québec

Post by border20 » Wed Feb 26, 2003 6:54 am

You can just put a submit button, and from there, the text is passed to the next page as a variable with the same name as your text box

Code: Select all

<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> 
Name: <input type="text" name="name" size="20"></p>
<Input type='submit' name = 'submit' value = 'Submit'>

If ($_POST['submit']){
echo $_POST['name'];
}

edited by Redcircle

something like this should do
but i'm still a newb :)
hope it helps

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Post by Oleg Butuzov » Wed Feb 26, 2003 7:44 am

don forget to turn gerister_globals=on

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Dante and 1 guest