Unable to pass values throug form
| From: | Perdeep Singh | Date: | Fri, 06 Dec 2002 00:20:54 +0000 |
| Subject: | Unable to pass values throug form | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969357205@lists.php.net to get a copy of this message | ||
Sir,
i installed php 4.3.3 on windows xp having iis 5.1 it's great working except that it
not able to take value through form .As shown in below code show() function called easily but when v
click on button it dosn't take value of hidden field name call and hence unable to call
function show2().
Sir i'll b very much thankful to u if u solve my this problem. Waiting 4 u r mail.
Perdeep Singh
(India)
<html>
<head>
</head>
<body>
<?php
global $call,$HTTP_POST_VAR;
echo"Call is $call";
switch($call)
{
case"":
show();
break;
case"show2":
foreach($HTTP_POST_VAR as $key=>$val)
{
echo"<br>$key := $val";
}
show2();
break;
}
function show()
{
echo"<form name='frm' method='post' action='http://localhost/test.php'>";
echo"<input type='hidden' name='call' value='show2'>";
echo"<input type='submit' name='submit'
value='submit'>";
echo"</form>";
}
function show2()
{
echo"here in show2 function";
exit;
}
?>
</body>
</html>