
Originally Posted by
280689
Code:
http://localhost/painel/<br /><b>Notice</b>: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in <b>C:/xampp/htdocs/painel/cadastrar.php</b> on line <b>55</b><br /><br /><b>Notice</b>: Use of undefined constant QUERY_STRING - assumed 'QUERY_STRING' in <b>C:/xampp/htdocs/painel/cadastrar.php</b> on line <b>55</b><br />/painel/cadastrar.php?
That's pretty self explanatory...
The PHP code is really poor. It was coded on a PHP4 powered server, and with very shady coding habits.
You have 2 solutions.
- fallback to version 4 of PHP (but you'll still have ugly code).
- search for all the $_SERVER occurences in every files in the manager and fix it.
Currently it's used like this:
PHP Code:
<form name="form_cad" action="<?=$_SERVER[PHP_SELF]."?".$_SERVER[QUERY_STRING]?>" method="post" enctype="multipart/form-data" onSubmit="disabledBttn(this);return verifica()">
And it assumes PHP_SELF and QUERY_STRING are constant. They are keys for the associative array $_SERVER and should be written as strings.
You need to wrap it inside simple/double quotes, like this :
PHP Code:
<form name="form_cad" action="<?=$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']?>" method="post" enctype="multipart/form-data" onSubmit="disabledBttn(this);return verifica()">
So in every single file, you have to do:
PHP Code:
// Before
$_SERVER[BLAH_BLAH]
// After
$_SERVER['BLAH_BLAH']