knowram Posted February 14, 2007 Share Posted February 14, 2007 First let me say I don't know if this is where this question should go or not so I apologize if it is the wrong location. I have been playing with an old ibook that I had lying around. I have set it up to use as a web server for demos and development. everything is running great (php, mysql, etc..). But I just tried to upload the site I have been working on for a while to see if I could get it to work. Right of the bat a problem. the first page is a login page just a username is required so I have a text box and a submit button simple. But it didn't seem to be submitting the value in the text box. So on that next page I put 2 statements 1. print_r ($_REQUEST); 2. echo $drname drname is the name of the text box by the way. it shows up fine in the array but will not print using the echo statement. Is there some setup on the server that I need to do so it will handle variables this way? If so is there going to be something else that I am going to have to do in order to pull cookies? thanks for the help Quote Link to comment Share on other sites More sharing options...
lachild Posted February 14, 2007 Share Posted February 14, 2007 Sounds like Register Global in the php.ini file is turned off. If thats the case you will need to set $drname to the value in request in order for it to work. Quote Link to comment Share on other sites More sharing options...
knowram Posted February 14, 2007 Author Share Posted February 14, 2007 Dose anyone know where the php.ini file is on a mac and what I would need to do to turn register global on? Quote Link to comment Share on other sites More sharing options...
worldworld Posted February 14, 2007 Share Posted February 14, 2007 Find php.ini here... Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted February 14, 2007 Share Posted February 14, 2007 Dose anyone know where the php.ini file is on a mac and what I would need to do to turn register global on? Don't You should code your site so it works with register_globals off. having register_globals on can create security exploits in your code, which could allow a malicious attacker to take control of your website. This is one of the many reasons why register_global is now turned off by default. SO instead of using $drname to get the contents of the textbox you use $_POST['drname'] (or $_GET['drname'] - depending on your forms submit method) instead. Also if the ebook you are using teaches you old styles of coding don't use it. Get a more up to date version. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.