I basically know the drill with GET and POST and how they relate to HTTP messages and URL encoding and stuff like that, its not my question..
What I've never got is why sometimes you get a form and you can only access it with GET and can't use POST. Am I missing something because I've been stuck a couple of times in the past with it.
Here's a basic HTML form
<form method="post" action="contact.php" enctype="text/plain" id="con_form" >
<fieldset>
<ul>
<li>*Name<span class="sliptoright"><input type="text" size="35" maxlength="35" name="name" /></span></li>
<li>*Email<span class="sliptoright"><input type="text" size="35" maxlength="35" name="email" /></span></li>
<li>*Subject<span class="sliptoright"><input type="text" size="35" maxlength="35" name="subject" /></span></li>
<li class="shuntdown">Please enter a short message<textarea rows="8" cols="43" name="comment" ></textarea></li>
<li><input class="button" type="submit" value="Submit" name="submit" tabindex="8"/><input class="button" type="reset" value="Reset" name="reset" tabindex="9"/></li>
</ul>
</fieldset>
</form>
Now that works pretty well if I use this PHP to access its values...
[code=php]name = strip_tags(trim($_GET['name']));
$email = strip_tags(trim($_GET['email']));
$subject = strip_tags(trim($_GET['subject']));
$comment = strip_tags(trim($_GET['comment']));[/code]
But if GET is substituted in both the form and the PHP any code following will not have the values they need for name, email, subject and comment. Yet a nearly identical form works fine with POST.
So, am I missing something? Its fine to use GET in this instance and it works but its bugged me for a long time. What could be the issue involved here?
Thanks in advance for any input on this one...
Norty Pig Web Development
http://www.nortypig.com
http://www.blog.nortypig.com