on 11.03.2001 16:16 Uhr, Fates at [EMAIL PROTECTED] wrote:

> My strings are getting cut off when I pass to destination web page
> 
> Example:
> 
> Assign variable from database
> $subcategory = mysql_result($result,$i,"subcategory");
> 
> Variable $subcategory  is assigned "Graphic Editors" from database
> (notice two words)
> 
> Next I make a link and pass the variables to new page when person clicks
> link
> <? echo "<a
> href='addupdate.php?category=$category&subcategory=$subcategory
> 
> New page appears
> The value of $subcategory is:  Graphic     It cut off everything after
> Graphic, How do I fix that?
> 
> 
> 

Yes, because there is a space in the word you want to submit over the URL.
What you would need to do is:

$subcategory = urlencode($subcategory);
<a href='addupdate.php?category=$category&subcategory=$subcategory

By this way the space is converted to the equivalent ascii-char -> %20 and
then it should not get cut of anymore.

regards, Jens Nedal



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to