Okay, so say you have to pass in an action and an id, and want to use a URL like index.php?action=delete&id=2. Problem is, XHTML sees that as invalid. So, in PHP4.4.1, is there a way to pass in two variables without using the ampersand?
you could use +
If by + you mean index.php?action=delete+id=2, that doesn't work. It might in PHP5, but like I said, I'm using PHP 4.4.1. Does anyone know of a valid way to do it in PHP4?
it won't work straight out that way-- you'd have to split the query string
$q_string = explode('+', $_SERVER['QUERY_STRING']); $_GET = $q_string;
or you could use javascript to revise the url, then change the location.
have you tried subsituting & for & in your urls?
Dont use the + here, since you do not want a single name/value pair separated by urlencoded commas. You want separate name/value pairs.
Cent is probably right, you did not use the correct character entity code to encode the ampersand.
A thread from yesterday: http://www.phpbuilder.com/board/showthread.php?t=10323140
Thanks, the & trick worked. I didn't stop to think about the fact that & is a special character. Just a lamebrained move on my part...