passing variable do not display value

A

Anonymous

Guest
I am using PHP 4 with Apache 2. I have a very misterious
problem.

I make a file with the name of job_simple.html the code is
as follows:

<HTML>

<BODY>
<H1>Phop's Bicycles Job Application</H1>
<P>Are you looking for an exciting career in the world of cyclery?
Look no further!
</P>

<FORM NAME='frmjobapp' METHOD=post ACTION="/phppractice/jobapp_simple_action.php">
Please enter your name:
<INPUT NAME="applicant" type="text"><BR>
<INPUT NAME="enter" TYPE="submit" VALUE="Enter">
</FORM>
</BODY>
</HTML>

Now when I enter any string in the name field and press enter
jobapp_simple_action.php prints only Welcome the $applicant
value does not show by browser. The code of
jobapp_simple_action.php is as follows:

<HTML>

<BODY>
<P>Welcome <?php echo ($applicant); ?></p>
</BODY>
</HTML>

Anyone knows please help me, thanks in advance.

Regards
Muhammad Ali
 
You must have gotten this code out of an outdated book or tutorial. This is a register_globals problem.

You should be using $_POST['application'] instead of $application, or $_GET['application'] if your form method is GET.
 
dude...
here is the moderator on this issue
http://www.php-forum.com/p/viewtopic.php?t=1483
 
Back
Top