Jump to content

form post problems?


knowram

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.