I encounter the parameter $choice is empty from the below statement. Pls help me.
Here I face the parameter passing with empty value.I attach the code here:
call.php
--------
<?php
// call.php
require("standard.php") ;
//$choice = $_POST["$choice"]; // temp
//echo ("ChoiceX: " . $choice); // temp
if (!$choice){
echo ("Choice1: " . $choice); // temp
GenerateFrontPage();
} else if ($choice == "choice1"){
echo ("Choice2: " . $choice); // temp
}
else if ($choice == "choice2"){
echo ("Choice3: " . $choice); // temp
}
?>
standard.php
------------
<?php
function GenerateFrontPage() {
//printf("<FORM ACTION=call.php METHOD=POST>");
printf("<FORM METHOD=post ACTION=call.php>");
printf("<INPUT TYPE=\"submit\" NAME=\"choice\" VALUE=\"choice1\">");
printf(" ");
printf("<INPUT TYPE=\"submit\" NAME=\"choice\" VALUE=\"choice2\">");
printf("<BR>");
printf("<BR>");
}
?>
Here I would like to say thank you for you all.Because I cracking my head for 2 weeks to solve this.I'm a beginner.
Thank you.
tcc
