Re: PHP] can't pass complete URL (part of the query string)

From: Date: Tue, 26 Nov 2002 17:52:27 +0000
Subject: Re: PHP] can't pass complete URL (part of the query string)
Groups: php.general 
Request: Send a blank email to php-general+get-126139@lists.php.net to get a copy of this message
Chris - Tried that -- I have urlencode in the script that sends the url and I have url encode right below the form action -- ref is getting cut off at the first ampersand - regardless: where: <form action="http://embitec.com/fishcart/email.php?ref=http://embitec.com/fishcart/displayem.php3?cat=5&olimit=0&zid=1&lid=1" method="post"> and: <input type="hidden" name="ref" value"<? php echo rawurlencode($ref); ?>"> or even <input type="hidden" name="ref" value"<? php echo rawurlencode($_GET['ref']); ?>"> yields: <input type="hidden" name="ref" value="http%3A%2F%2Fembitec.com%2Ffishcart%2Fdisplayem.php3%3Fcat%3D4"> still cutting off everything after the ampersand..?? Best, Nicole <form action="http://embitec.com/fishcart/email.php?ref=http://embitec.com/fishcart/displayem.php3?cat=5&olimit=0&zid=1&lid=1" method="post"> There is your problem right there. Here are the variables you are passing: ref=http://embitec.com/fishcart/displayem.php3?cat=5 olimit=0 zid=1 lid=1 The URL you want to set ref to needs to be URL encoded. You can use rawurlencode() to achieve this. You will know you have it right when your HTML form tag looks like this: <form action="http://embitec.com/fishcart/email.php?ref=http%3A%2F%2Fembitec.com%2Ffishcart%2Fdisplayem.php3%3Fcat%3D5%26olimit%3D0%26zid%3D1%26lid%3D1" method="post"> Hope that helps. Chris -- ######################## Nicole Lallande nicole@nmlconsulting.com 760.753.6766 ########################

« previous php.general (#126139) next »