Ask a Question related to PHP Development, Design and Development.
-
Justin Koivisto #1
Re: Passing URL Variable in PHP
Scott D wrote:
echo '<a href=test.php?varName=', urlencode($headquarters_name), '>',> Anyone know how to solve this? I am passing a URL variable to another
> page, the variable is the result of an SQL query. The results of the
> query can be multiple words seperated by a space, the variable though
> is only passing the first word of the result to the target page. Any
> ideas?
>
> Here is the code
> $query = "SELECT * FROM location";
> $result = mysql_query($query)
> or die ("Couldnt execute Query.");
>
>
> while ($info = mysql_fetch_array($result))
> {
> extract ($info);
> echo "<a href=test.php?varName=$headquarters_name>$headquar ters_name<br></a>";
$headquarters_name, '<br></a>';
Then in the target page:> }
>
> My Target page will only print the first word of the result string,
> and I need the full string.
echo urldecode($_GET['varName']);
HTH
--
Justin Koivisto - [email]spam@koivi.com[/email]
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Justin Koivisto Guest
-
passing SQL in a variable
In a nutshell, user selects a bunch of radio buttons to search. On the next page, I try to put that information into queryable form: <cfif... -
Passing a variable to asp
I cannot work out how to get the variable namefirst from flash to the asp I use : ... -
URL Variable Passing
First off, a disclaimer - I'm new to Cold Fusion and not well versed in all that it is capable of. I am trying to use a <cfformitem> tag to put an... -
Passing a second value in a variable
Two or querysting variables can be passed by separateing them with an ampersand: page.asp?p1=1&p2=2 HTH, Bob Barrows Raphael Gluck wrote: -
passing javascript variable into asp variable using vbscript
The subject pretty much sums up what I need to do. Here is what I have so far, but still can't figure out how to get it working: <script...



Reply With Quote

