| Forest Liu 2005-03-20, 8:56 am |
| in jobapp.html, you write:
<form ...... action=3D"jobapp_action.php">
but not "processform.php".
On Sun, 20 Mar 2005 21:00:50 +1100, Allan Cooper
<oberon-ken-obi@froggy.com.au> wrote:
> Hi all
>=20
> My setup is thus:
>=20
> Installed on WinXP (SP1) Web-Server SuiteVersion 1.14 standard,
> auto-setup which includes the following:
> PHP 4.3.10
> apache 2
> MySQL
> PhpMyAdmin
> and Perl (But I dont intend to use it just yet, thats a problem for
> another day lol)
>=20
> I believe PHP is setup as a module in apache as opposed to a cgi-bin
> install. Well thats what it says anyways.
>=20
> Setup went well and all elements appeared to work fine, until.....
> Now excuse the rudimentary nature of the scripts.
> The code samples that follow were taken from Professional PHP
> Programming by Wrox Press. ISBN 1-861002-96-3
> It was written when PHP4 was just starting, so some conventions are
> changed. (see comments below)
> See http://www.wrox.com for more info.
> Comments are for my benefit, but I left them in to make it simpler for al=
l.
> ----------------------
> <html>
> <!-- jobapp.html -->
> <!-- generates a form to send info to processform.php -->
> <head> </head>
> <body>
> <h1>Phop's Bicycle Shop Job Application</h1>
> <p>Are you looking for an exciting career in the world of
> cyclery?<br>
> <p>Look no further!</p>
> <form name=3D'frmjobapp' method=3Dpost action=3D"jobapp_action=
..php">
> Please enter your name here:
> <input type=3Dtext name=3D"applicant"><br>
> <input name=3D"enter" type=3Dsubmit value=3D"ENTER"><br>
> </form>
> </body>
> </html>
>=20
> ---------------------
> <html>
> <!-- processform.php -->
> <head> </head>
> <body>
> <p>Welcome, <?php echo ($_POST["applicant"]); ?>!</p> <!--
> note that you need to use
>=20
> ($_POST["applicant"])
>=20
> instead of the depricated ($applicant)
>=20
> in PHP Programming on p72
>=20
> a directive in php.ini demands it -->
> <br><br>
> <a target=3D"_new" href=3D"name.php?applicant=3D<?php echo
> (urlencode($_POST["applicant"])); ?>"> Show Name</a>
> </body>
> </html>
> ---------------------
> <html>
> <!-- name.php -->
> <head> </head>
> <body>
> <p>Welcome, <?php echo ($_POST["applicant"]); ?>!</p> <!--
> supposed to be parsed the name/value pair
>=20
> from processform.php
>=20
> note that need to use
>=20
> ($_POST["applicant"])
>=20
> instead of the depricated ($applicant=
)
>=20
> in PHP Programming on p76
>=20
> a directive in php.ini demands it -->
> </body>
> </html>
>=20
> ----------------------
> My problem is thus:
>=20
> In name.php, it is supposed to be passed the name/value pair from
> processform.php
> This does not happen, although it works from jobapp.html to processform.p=
hp
> This has to be a simple problem as the initial name/value pair worked
> correctly.
> Can anyone please tell me whats going on?
>=20
> Any further info/configuration files needed, please just say and ill
> supply it.
>=20
> Regards
> Allan
>=20
--=20
Sincerely,
Forest Liu(=E5=88=98=E4=BA=91=E8=B5=9F)
|