Hi people, I’ve got a problem:
I have an html-emailform. The user can type in a subjectline and the message. What I want to happen is that if the user hits submit a new window with Gmail ‘new message’ opens, with the subject and message already filled in (for this to happen you need to be logged into gmail on your computer).
The problem is how do I directly get the filled in data from the formfields in the gmail-link?
I’ve tried the following:[LIST]
[]the ‘action’ of the form opens a php-page in which the value of the fields is stored in a variable $message (this example is just with the message):[LIST]
[] [LEFT]
$message = $_POST["message"];
[/LEFT]
[/LIST] [/LIST][LIST]
[*]
The submit-tag looks like this:
[LEFT]
<input type="submit" name="Submit" value="Submit"
onclick="window.open('http://mail.google.com/mail/?view=cm&fs=1&tf=1&su=test&to=test@test.nl&body=<?php echo $message; ?>&fs=1', 'gmail window'); return false" />
[/LEFT]
[/LIST]As you can see I’m trying to somehow echo the message that is filled in the form in this link. But it’s not working: gmail opens alright, but no message is filled in. ;(
I wonder if I should use javascript to get that information, because php isn’t working, but I don’t know how to do it.
Does someone here have an idea?
thanks,
Michèlle