dennisb
08-22-2002, 09:15 PM
Working on my local drive with allow_call_time_pass_reference set to Off and register_globals set to Off (the apparent way of the future),
is there any way to use a self-submitting form without getting Undefined index errors when the page first loads? After submitting the form the errors are gone because the index is defined, but when the page first loads I get the error. Thanks in advance - Dennis
Here is the PHP block to receive two variables from an HTML form:
$multiply1 = $_REQUEST['multiply1'];
$multiply2 = $_REQUEST['multiply2'];
function do_multiply($multiply1=0, $multiply2=0){
$multi_answer = ($multiply1 * $multiply2);
if($multi_answer != 0) {
echo ($multi_answer);
}
}
do_multiply($multiply1, $multiply2);
is there any way to use a self-submitting form without getting Undefined index errors when the page first loads? After submitting the form the errors are gone because the index is defined, but when the page first loads I get the error. Thanks in advance - Dennis
Here is the PHP block to receive two variables from an HTML form:
$multiply1 = $_REQUEST['multiply1'];
$multiply2 = $_REQUEST['multiply2'];
function do_multiply($multiply1=0, $multiply2=0){
$multi_answer = ($multiply1 * $multiply2);
if($multi_answer != 0) {
echo ($multi_answer);
}
}
do_multiply($multiply1, $multiply2);