Darek Gajda
Darek Gajda

Reputation: 545

PHP Issues with <textarea> in a Form

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. :)

Upvotes: 0

Views: 402

Answers (1)

user752723
user752723

Reputation:

Try

$contents = $_POST['details'];

instead of

$contents = $_REQUEST['details'];

Upvotes: 2

Related Questions