Re: newbie help, pressing the submit button returns nothing
| From: | Eugene Mah | Date: | Fri, 04 Apr 2003 13:54:18 +0000 |
| Subject: | Re: newbie help, pressing the submit button returns nothing | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-142329@lists.php.net to get a copy of this message | ||
At 08:24 04-04-03 -0500, you wrote:
On Friday 04 April 2003 07:43 am, Petre Agenbag wrote: Your problem is not with PHP but with basic HTML. Your <FORM> tag needs an action="www.somepage.com" in order to "do" something. With PHP, you can call the same page back onto itself. Hi Petre, Thanks for the reply, I have actually tried this too and all the output I get is "Welcome !" but the username that was entered into the form box should appear between the Welcome and !, Please take a look at the code below:Unless your register_globals is set to on, you should be using <?PHP echo $_POST['applicant']; ?> instead Eugene ----------------------------------------------------------------------<HTML> <!-- Jobapp.html--> <BODY> <H1>Practice app</H1> <p>Fill in the name and echo it back to the user.</p> <FORM NAME='frmJobApp' METHOD=post action="jobapp_action.php"> Please enter your name: <INPUT NAME="applicant" TYPE="text"><br> <INPUT NAME="enter" TYPE="submit" VALUE="Enter"> </FORM> </BODY> </HTML> ---------------------------------------First page named: jobapp.htmlWelcome <?php echo $applicant; ?>!Second page: named jobapp_action.php
Eugene Mah, M.Sc., DABR eugenem@ix.netcom.com Medical Physicist/Misplaced Canuck maheug@musc.edu Department of Radiology "For I am a Bear of Very LittleMedical University of South Carolina Brain, and long words Bother
Charleston, South Carolina me." Winnie the Poohhttp://www.netcom.com/~eugenem/ PGP KeyID = 0x1F9779FD, 0x319393F4
PGP keys available on request ICQ 3113529 O----------------------------------------------------------------------