RE: [PHP-DB] need help guys

From: Date: Thu, 14 Mar 2002 11:31:51 +0000
Subject: RE: [PHP-DB] need help guys
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17681@lists.php.net to get a copy of this message
hi Rehab Because your submitted text on the url contains an '&' anthing after this character will be parsed as a new variable. Instead of location.href="additems.php?category="+c try location.href="additems.php?category="+escape(c) this will encode the '&' aswell as spaces to preserve the entire string Hope this helps TJ -----Original Message----- From: its me [mailto:fotna@egypt.net] Sent: 14 March 2002 11:21 To: php-db@lists.php.net Subject: [PHP-DB] need help guys i have this <select name=category> <option value='Arts'>Antiques & Arts</option> then i pass this to next page: <script> c=document.forms[0].category.options[document.forms[0].category.selectedInde x].text location.href="additems.php?category="+c </script in url it shows like this: http://localhost/auction/seller/additems.php?category=Antiques%20&%20Arts but in additems.php when i say echo $category it give me only Anticues !!!! Rehab M.Shouman ------------------------------------------------------------ ------------------------------------------------------------ --------------------------------------------------------------------- Express yourself with a super cool email address from BigMailBox.com. Hundreds of choices. It's free! http://www.bigmailbox.com --------------------------------------------------------------------- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#17681) next »