473,396 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

magic quotes and register globals

even though register globals is disabled by default, i'm currious as to
how it and magic quotes interact. consider the following code:

<?
// assuming $_GET['var']='"test"' and register globals enabled
echo $var;
?>

will the output be "test" or \"test\"?

Jul 17 '05 #1
1 1797
First of all, magic quotes and register globals have nothing to do with
each other. If register globals was enabled in your example above, a
variable $var would automatically available. If register globals is
disabled, it won't be available as $var, but rather as $_GET['var'] (or
$_POST['var'], etc.).

If you have magic_quotes_gpc enabled, your example will output \"test\"
regardless of the register globals setting.

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would...
7
by: Paul Liversidge | last post by:
I'd like your opinions as to why I don't use something like this... A function that iterates through $_GET, $_POST, $_COOKIES and $_SESSION arrays and turn them back into conventional variables....
1
by: Manu J | last post by:
Hi, i have a login script which makes use of sessions. Login script *********** session_start() ..... ..... ....
2
by: Marcus | last post by:
Hi all, I've been reading up on magic quotes but I'm still confused, seems like all the info I can find is just regurgitating the little blurb in the php manual. My question is this: if I turn...
4
by: Dave Moore | last post by:
Hi All, Can anybody point me to a FAQ or similar that describes what all this stuff is about please?. I'm interfacing with a MySQL database if that's relavent. I've read a couple of books which...
10
by: Jon | last post by:
All, Yes, it's more of the famous 'what do I do about magic_quotes' questions. Anyways, here we go: I've been a PHP developer for about a year now, and have grown to detest magic_quotes for...
5
by: robert | last post by:
Turning algs for old NumPy modules into numpy code I suffer from this: Upon further processing of returns of numpy calculations, lots of data in an apps object tree will become elementary numpy...
0
by: Patrick Maupin | last post by:
__builtins__ in 2.5.2 doesn't seem to behave like I remember it did the last time I did some custom stuff with it, a very long time ago. This isn't surprising, because of ongoing optimization,...
3
by: Gabriel Genellina | last post by:
En Sun, 07 Sep 2008 14:00:48 -0300, Patrick Maupin <pmaupin@gmail.comescribió: Python takes some shortcuts when dealing with builtins. I'll just describe what happens (I won't say whether it is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.