RE: [PHP-DB] argh! still not able to get my variables

2003-10-10 Thread Mayo, Chuck
Shiloh,

I'm kind of a latecomer here, but on my system, this works:

COUNTY ID: $county_id\n";
} else {
}   print "No County ID\n";

?>


17089
9

Can't think why you wouldn't be able to access that value unless you're
accidently clearing it before checking it. If you're trying to access
$county_id from inside a function, though, you'll need to declare it as a
global so the function won't think you're referencing a local variable by
the same name, i.e.

function process_submit() {

global $county_id;

print "ID: $county_id\n";

}

> -Original Message-
> From: Shiloh Madsen [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 5:58 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] argh! still not able to get my variables
> 
> 
> First off, thank you to all the people who have helped me so 
> far with passing variables in a URL. I THINK it worked, but 
> it would appear not to have. 
> 
> this is the line in the page with the link:
> 
> $name
> 
> So what this should do is make the line item be a hyperlink 
> to a detail page for the county. When i click the link, the 
> address shows up as: 
> 
> http://cis1.elgin.edu/cis21020/detail.php?county_id=17089
> 
> so it appears to be passing the information. 
> 
> The thing is, i cant refrence that variable...maybe in doing 
> it wrong, but i dont know. 
> 
> Ive tried echoing $county_id and nothing shows up. Someone 
> else suggested that i put var_dump($_GET);
> into the page to see if it shows up in the variable list. 
> When i insert this line, the page only says NULL. What in the 
> world am I doing wrong?
> 
> 

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



[PHP-DB] argh! still not able to get my variables

2003-10-10 Thread Shiloh Madsen
First off, thank you to all the people who have helped me so far with passing 
variables in a URL. I THINK it worked, but it would appear not to have. 

this is the line in the page with the link:

$name

So what this should do is make the line item be a hyperlink to a detail page for the 
county. When i click the link, the address shows up as: 

http://cis1.elgin.edu/cis21020/detail.php?county_id=17089

so it appears to be passing the information. 

The thing is, i cant refrence that variable...maybe in doing it wrong, but i dont 
know. 

Ive tried echoing $county_id and nothing shows up. Someone else suggested that i put 
var_dump($_GET);
into the page to see if it shows up in the variable list. When i insert this line, the 
page only says NULL. What in the world am I doing wrong?