RE: Getting values back out of a URL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When you go through the URL, you're using GET, not POST. ALl you really have
to do is this:

$parcel_query = "SELECT * FROM land01_02_03 WHERE (PelNumber LIKE 
".$_GET["number"].") AND (OnerName1 LIKE ".$_GET["number"].") ";

Then you can drop the while loop that extracts the variables from the HTTP
array.

I'm sure this is but one of many ways to accomplish what you want to do.

> -----Original Message-----
> From: Danialle Wiltsie [mailto:wiltsied@hotmail.com]
> Sent: Thursday, January 23, 2003 8:39 AM
> To: php-db@lists.php.net
> Subject:  Getting values back out of a URL
> 
> 
> 
> 
> 
> 
> 
> 
> I am trying to get my values back out of a URL that has been 
> passed from a 
> page with a form. Here's what the URL looks like.
> 
> searchresult.php?number=01&owner=smith&Submit=Submit
> 
> My mySQL query is working properly if I hard code a value in, 
> but I can seem 
> to extract the values of number and owner. Here is the code I 
> was told to 
> try previously:
> 
> <?
>       while (list($var, $value) = each($HTTP_POST_VARS)) {
>          ${$var} = $value;
>       }
> ?>
> 
> And here is my mySQL query:
> 
> $parcel_query = "SELECT * FROM land01_02_03 WHERE (PelNumber LIKE 
> '${number}%') AND (OnerName1 LIKE '${owner}%') ";
> 
> 
> If anyone could help me out, it would be really great.
> 
> Thanks,
> Danialle
> 
> 
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux