Forms - replaceing spaces " " with +
Posted: Fri Feb 13, 2004 3:03 pm
You know when you submit a form it changes all spaces to +
well I am reading contents from a database, $title $price, and $kind
well im out putting them to a table and I want another column available? so now i have added that and when i goto my page it shows it and it works, I made the variable $available into a link similar to the following
and it outputs exactly what i told it to but when you click the link it goes to email.php which looks like this:
And when I click the original link, since there is spaces in the variable $title only the first word of the title shows up on email.php and the rest of the variables are excluded
Would I replace spaces with a + when I printed the available? link originally or what?
?>
well I am reading contents from a database, $title $price, and $kind
well im out putting them to a table and I want another column available? so now i have added that and when i goto my page it shows it and it works, I made the variable $available into a link similar to the following
Code: Select all
echo("<tr><td width>$name</td><td>$age</td><td>Fiction</td><td>Non-Fiction</td><td><a href=email.php?name=$name&price=$age&cat=fiction>Available - yes</a></td></tr>\n");Code: Select all
<?
$name = $_REQUEST['name'] ;
$price = $_REQUEST['price'] ;
$cat = $_REQUEST['cat'] ;
echo("You have selected to purchase the book titled $name which will charge you a total of $price , it is a $cat book");
?>Would I replace spaces with a + when I printed the available? link originally or what?
?>