[SOLVED] $_server array (registered global)
Moderator: General Moderators
$_server array (registered global)
Is the $_Server array blocked if the registered_globals set to off?
--Pizml
--Pizml
This "get" you are refering to is the ID varible I use in a url. I never set
$_get['id'] = $id
I just put in in the url like so:
$_get['id'] = $id
I just put in in the url like so:
Code: Select all
print "<td><a href="inkrequest.php?id=$row[workorder_id]">".stripslashes($row['workorder_id'])."</a></td>";
}- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
twigletmac | Help us, help you. Please use
I didnt know it mattered how I used the variable once i had it on the other page?
From
Pizmal
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I simply use the varible on the next page to test for it.Code: Select all
IF (! empty($ID) {
( DO FOO)
} ELSE {
(DO BAR)
}From
Pizmal
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
With register_globals off just doing:
won't work because $ID doesn't exist, to test for the 'ID' variable in the URL, you would have to do:
Mac
Code: Select all
if (!empty($ID)) {Code: Select all
if (!empty($_GET['ID'])) {-
Black Unicorn
- Forum Commoner
- Posts: 48
- Joined: Mon Jun 16, 2003 9:19 am
- Location: United Kingdom
That would explain why it doesnt work with reg globals off :) Thank you for your help. I was looking through my site and figure if $_server wasnt effect which i kinda knew it wouldnt be that it would have to be somethign with how i carried over the variable.
Once again thanks for showing me the way!
--Pizmal
Once again thanks for showing me the way!
--Pizmal
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK