I just started using error reporting on my scripts because im an idiot and never really thought about it before...
anyways, i keep getting this error, and i'm not really sure what to do to change it....
Notice: Use of undefined constant op - assumed 'op' in /path_to/test/test.php on line 5
Notice: Undefined index: op in /path_to/test/test.php on line 5
.. and here's an example of the code i'm using that causes this error:
if ($_POST[op] == "upload") {
// perform upload actions
}
if (!$_POST[op]) {
$display_block = " <form enctype='multipart/form-data' action='$_SERVER[PHP_SELF]' method='post'>
<input type='hidden' name='op' value='upload'>
<input type='hidden' name='MAX_FILE_SIZE' value='2000000'>
<input type='file' name='cover' size='55'><br />
<br />
<input type='submit' name='submit' value='submit'>
</form>";
}
anyone know how i can fix this? in a php book i read it taught me to use that hidden [op] field as a way to do that... is that incorrect?