I have created a simple email like page:
<script=javascript>
function goAttach(frm) {
frm.method="get";
frm.action='addAttach.php';
}
</script>
<form method='POST' action='save.php'>
<input type='submit' value='send'>
<input type='submit' value='Add/Del Attachment' onClick='goAttach(this.form)'>
<input type=textarea name=body row='30'
column='30'>$_SESSION['body']</textarea>
The form uses POST but the Add/Del attachment button use GET method. Because I would like to "remember" what users have typed. I need to save textarea content in SESSION so that when user come back the page, textarea would show what he has typed.
But the problem is: when user type a lot of text. Add/Del attachment button doesn't work. I'd like to know if GET can only pass a limited length of variable? If it does, how to overcome this situation? If i use POST, how to correct the form so that it is not post to save.php, but post to addattach.php