RE: [PHP-DB] need help guys
you can't pass a literal in a url - it makes it think that it's the next variable. -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: 14 March 2002 11:21 To: [EMAIL PROTECTED] 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 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 19/02/02 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.325 / Virus Database: 182 - Release Date: 19/02/02 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] need help guys
Can you send us the full script?? Why can't you just do a submit??? The problem is the ampersand () in the middle. This is a place marker which marks the start of the next variable in the query string. If you absolutely *HAVE* to submit the data this way, you'll need to convert it to the escape %26 So that it passes the correct value: http://localhost/auction/seller/additems.php?category=Antiques%20%26%20Arts HTH, Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED] -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: 14 March 2002 11:21 To: [EMAIL PROTECTED] 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] need help guys
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:[EMAIL PROTECTED]] Sent: 14 March 2002 11:21 To: [EMAIL PROTECTED] 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php