0

Forgive me for asking such a basic question, I am a beginner and not too familiar with PHP in general but I've looked around and have not found an IE compatible solution to my issue.

I used W3 schools: http://www.w3schools.com/tags/tag_textarea.asp & http://www.w3schools.com/tags/att_textarea_form.asp to find this out.

I am making a basic PHP form, in part of the form I have a for users to fill in and then pass the value to a variable to email off. Anyways, I've found a solution that works in Chrome/Opera/Mozilla but not IE, that is to use the form "id" tag.

<form method='post' id='usrform' action='form.php'>
<textarea name='details' form='usrform' rows='8' cols='60'></textarea>
</form>

So that I can do this.

$contents = $_REQUEST['details'];

Hopefully I have explained this well enough. :)

4
  • What doesn't work in IE? What's the behavior? Commented Dec 24, 2012 at 0:41
  • $contents = $_REQUEST['details']; should work fine... Commented Dec 24, 2012 at 0:42
  • 2
    w3schools isn’t really the best place to begin, though. w3fools.com Commented Dec 24, 2012 at 0:42
  • It simply does nothing, the page submits and the rest of the form data goes through without issue but its as if the $contents variable is completely empty. Commented Dec 24, 2012 at 0:43

1 Answer 1

2

Try

$contents = $_POST['details'];

instead of

$contents = $_REQUEST['details'];
Sign up to request clarification or add additional context in comments.

6 Comments

Hey this seemed to work! Thank you!! Any reason for this? I thought a $_REQUEST would be appropriate. I'd upvote you but I'm too new. ;)
You don't need reputation to mark as answer. Just click the "check" near the upvote and downvote buttons. :)
$_REQUEST should work exactly the same as long as you don't modify the $_POST or $_GET during runtime. $_REQUEST contains all post, get, and cookie superglobals.
$_GET is for forms that pass through the URL, (method='get'), $_POST is for forms that utilize method='post', and $_COOKIE is for cookies (little snippet of data, not securely, but saved on the browser). PRPGFerret is right, $_REQUEST should work for all of them, but it didn't in this case. :| I did read though that's it's generally better to use $_REQUEST, $_COOKIE OR $_POST when you are able. Glad my answer helped. Oh, and PLEASE mark as correct answer. :)
Awesome, thanks a ton guys that was a quick answer. It didn't let me mark it right away, I guess it has a 15 minute timer.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.