Re: Unable to pass values throug form

From: Date: Sun, 07 Dec 2003 07:44:55 +0000
Subject: Re: Unable to pass values throug form
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-12339@lists.php.net to get a copy of this message
register_globals = off since PHP 4.1 > that means you got to use $_GET or $_POST and so on. Perdeep Singh wrote:
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";
echo "Call is " . $_POST["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>


« previous php.install (#12339) next »