This is my form code:
<form action="searchresult.php" method=post>
<font face="Arial" size="3">
<body>
<?php
$type = 2;
.....
?>
</form>
And this is searchresult.php:
<?php
if ($HTTP_POST_VARS["type"] == 2)
echo 'reports';
else if ($HTTP_POST_VARS["type"] == 1)
echo 'students';
else
echo 'nothing';
?>
I get the mesage:
Undefined index: type in C:.........searchresult.php pn line 9
I tried setting Register_Globals to On, and just call $type, but I'd get the same error. Since there is no track_vars setting in my php.ini, iassume it's always on.
I'm using PHP 4.3.2 on WinXP, using DzSoft PHP Editor's built-in http server on a single machine.
I have another problem which might be unrealted, but sometimes, the editor will take forever when loading the forms, eventually giving me a timeout error, and then I'd see an illegal memory reference error cause bythe editor.
Anybody knows why i got these problems?????