Its a setting in php.ini where PHP creates vars from form data/cookies if
its on. If it is on - its a security risk because anyone can change the
value of the data in your script by passing values in thru the URL.

So you need to keep it switched off (whereby vars will not be created from
form data) and use the superglobals $_POST, $_GET, etc to access your data
instead.

----- Original Message -----
From: "Stephen Craton" <[EMAIL PROTECTED]>
To: "'debbie_dyer'" <[EMAIL PROTECTED]>
Sent: Sunday, September 29, 2002 7:29 PM
Subject: RE: [PHP] Not Displaying From Vars??


> Sorry if I'm acting all noobish but, how do I register_globals?
>
> I already know about stripslashes and addslashes, I usually use those to
> store secured information.
>
> Thanks,
> Stephen
> http://www.melchior.us
> http://php.melchior.us
>
> :: -----Original Message-----
> :: From: debbie_dyer [mailto:[EMAIL PROTECTED]]
> :: Sent: Sunday, September 29, 2002 1:14 PM
> :: To: [EMAIL PROTECTED]
> :: Subject: Re: [PHP] Not Displaying From Vars??
> ::
> ::
> :: Yeah got to be register_globals and also a tip to save
> :: future problems if you are working with forms and u want to
> :: redisplay submitted data you will need to learn about
> :: stripslashes (if you have magic_quotes_gpc on) and htmlspecialchars.
> ::
> :: And for the db additions addslashes (for if magic_quotes_gpc is off)
> ::
> ::
> :: ----- Original Message -----
> :: From: "Stephen Craton" <[EMAIL PROTECTED]>
> :: To: <[EMAIL PROTECTED]>
> :: Sent: Sunday, September 29, 2002 7:00 PM
> :: Subject: [PHP] Not Displaying From Vars??
> ::
> ::
> :: > I bet you're getting sick of hearing from me but yet
> :: again, I'm having
> :: > trouble. I have a form that you type in a number for how
> :: many hours an
> :: > employee has worked. When they submit the form, it's supposed to
> :: > display, again, what they typed in and record them to a
> :: database to be
> :: > used for a later use. The form, evidently, submits fine
> :: but what my
> :: > problem is, is that it won't display what they typed in.
> :: >
> :: > All I'm doing is putting in this:
> :: >
> :: > <?php echo $sun_reg; ?>
> :: >
> :: > The input field looks like this:
> :: >
> :: > <input name="sun_reg" type="text" class="hours"
> :: id="sun_reg" size="4"
> :: > maxlength="3">
> :: >
> :: > Does anyone see the problem? I can assign the form method
> :: to be GET
> :: > and it displays all the field values in the URL just fine,
> :: it's just
> :: > not displaying in the page itself.
> :: >
> :: > Thanks,
> :: > Stephen
> :: > http://www.melchior.us
> :: > http://php.melchior.us
> :: >
> :: >
> :: >
> :: > --
> :: > PHP General Mailing List (http://www.php.net/)
> :: > To unsubscribe, visit: http://www.php.net/unsub.php
> :: >
> ::
> ::
> :: --
> :: PHP General Mailing List (http://www.php.net/)
> :: To unsubscribe, visit: http://www.php.net/unsub.php
> ::
> ::
> ::
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to