Thanx a lot for your help.I tried some other examples in a book named Mastering PHP that i'd like to discuss with you.
They are as follows:
<html>
<head><title></title></head>
<body>
<form action="you_are_adv.php" method ="GET">
Please fill in the following fields:</br>
<?php
$favourite_lang="PHP";
?>
<b>First Name:</b>
<input type="text" name="first" value="<?php print($first); ?>" size="15"><br/>
<b>Last Name:</b>
<input type="text" name="last" value="<?php print($last); ?>" size="15"><br/>
<b>Favourite Programming Language:</b>
<input type="text" name="favourite_lang" value="<?php print($favourite_lang); ?>" size="15"></br>
<input type="submit" value="Go!" size="15">
</form>
</body>
</html>
<html>
<head><title></title></head>
<body>
Hello<b><?php print($first . " " . $last);?></b>
I am glad to know your favourite programming language
is<?php print($favourite_lang); ?>
<?php
$query_string="";
$query_string .= "?first" .urlencode($first);
$query_string .= "&last=" .urlencode($last);
$query_string .= "&favourite_lang=" .urlencode($favourite_lang);
?>
<br/><br/>
<a href="who_are_you_adv.php<?php print($query_string) ?>">
Back to who are you advanced
</a>
</body>
</html>
The output was something like this after entering text and clicking the submit(GO) button:
(Hello I am glad to know your favourite programming language is
Back to who are you advanced)
And in the adress bar of the you_are_adv.php page i see the following:
(
http://127.0.0.1/you_are_adv.php?fir...urite_lang=PHP)
Now what is really going on?
What is the importance of urlencode???
Waiting for your reply...
CEO
InteliSoft
Maqsood ur Rahman
Life:An Endless Journey towards Perfection