Hi Felipe.
First of all... the lacking double-quotes at the end ot the string! So, the
right way is:
header("Location: validation.php?name=$name&mail=$mail&message=$message");
This line works well if...

Regarding your "question", the problem is in a uncorrect usage of the
variables while composing the Location string. Follow me:

1. consider you have a name composed of 2 or more "words". For instance:
$name="Felipe Lorente"; (but the same for $mail and $message).
When expading/substituting $name in the "header" function you have exactly
this:
header("Location: validation.php?name=Felipe Lorente&mail.....
As you can see the string has a "blank" space inside, so PHP thinks the
string ends to "Felipe", avoiding the rest!!!

2. it's a normal behaviour for PHP :-)

3.the correct syntax when working with URLs is to transform "normal values"
in "url-encoded values". That is to translate in a understandable way the
strings passed as URLs to a browser (in fact, when you call a Location, it's
the same as you type that URL directly in the browser). So before calling
Header("Location... make the following:
$name=urlencode($name);
$message=urlencode($message);
...
This function will transform all "strange" character in the string in
special values (i.e., "Felice Lorente" becomes "Felipe+Morente". As you can
see not more 2 differents words but just ONE!!!

4. While retrieving urlencoded values from validation.php, you must
(obviously :-) url-decode these values. So in validation.php before using
URL-passed params you have to:
 $name=urldecode($name)
 $message=urldecode($message)
...

I hope these notes can help you.


Bye
--
Francesco
[EMAIL PROTECTED]



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to