Here's what I had to do to get the commas and spaces through:
$date_and_time = str_replace(",", "-", $date_and_time);
$date_and_time = str_replace(" ", "_", $date_and_time);
echo "<input type=\"hidden\" name=\"date_and_time\" value={$date_and_time}>";
-----
$date_and_time = str_replace("-", ",", $date_and_time);
$date_and_time = str_replace("_", " ", $date_and_time);
echo "Congratulations!!!<br><br>
Your reservations are confirmed for $date_and_time<br><br>";
Actually, the addslashes and stripslashes weren't necessary because there weren't any quotes in the string.
Originally posted by leatherback
You do place "" around the value, do you?
<input type="hidden" value="July, 31 2005">
Because this should work just fine.
J.
Oh my, I was working with a string and didn't realize that was what I was missing. Maybe it's easier then if I add the quotes (with slash?) to the string . . .