Re: Cannot retrive the data ???
| From: | Janet Valade | Date: | Tue, 02 Nov 2004 04:25:20 +0000 |
| Subject: | Re: Cannot retrive the data ??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200906@lists.php.net to get a copy of this message | ||
PHPDiscuss - PHP Newsgroups and mailing lists wrote:
Hi there, Look at the following code please. I have a mysql db setup and apache running. I have the register_globals=OFF on the php.ini file. The code is suppose to show all the jokes in the databse and give user to enter jokes. The code works fine when when the register_globals=ON in the php.ini file. But for some reason it does not work when it is OFF. Infact when it is OFF it give a blank page with no data retrieved from the databse and gives no errors. Please help me.Code is below..." <?php if (isset($_GET[addjoke])){ ?> <form name="form1" method="post" action="<?php echo ($PHP_SELF); ?>"> Type your joke :<br> <textarea name="jokeText" id="jokeText"></textarea> <br> <input name="insert" type="submit" id="submit" value="Insert Joke"> </form>With register_globals off, you need to use $_SERVER['PHP_SELF']. You possibly have your errors turned off in php.ini. Check that error_reporting is E_ALL and display_errors is on. Janet -- Janet Valade -- janet.valade.com