Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass parameters? 1

Status
Not open for further replies.

may1hem

Programmer
Joined
Jul 28, 2002
Messages
262
Location
GB
Hi, I am moving from ASP to PHP but am having trouble with even the simplest task. I want to pass a parameter from a form to a processing page. Here is the code of both files:

MyForm.html

<html>
<head>
<title>my form</title>
</head>
<body>
<form action=process.php METHOD=post>
<input type=checkbox name=mychoice value=&quot;210&quot;>
<input type=submit value=Confirm>
</form>
</body>
</html>

process.php

<html>
<head>
<title>process form</title>
</head>
<body>
<?php echo ($mychoice);?>
</body>
</html>

So I go to IIS, select MyForm.html, and browse it. It opens up in Internet Explorer. I tick the box and click SUBMIT. The PHP page opens and gives an error &quot;Notice: Undefined variable&quot; for the form checkbox &quot;mychoice&quot;.

How can I fix this?

Thanks,
May
 
You are experiencing the well-known register_globals issue. See FAQ434-3686.

//Daniel
 
Thanks Daniel!

*STAR* for you.

May ;o)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top