I have a page with a form on it. What I need to do is to save the page before sending out the form. So, the visitor completes the form and press the send button. When this happens I need to see how the form looks at that point. I know I can send the result to e-mail but there are to many fields to edit to do this, so I am wondering if I can just save the page as it is. Any idea?
You're saying you literally want a screenshot of the form? Why not just save the information to a database and recreate the fields by pulling the information? I'll do that for you if you post your code. - BS
I guess you wanted to say that the code would need many changes? Well, taking a screenshot and then posting it back to your server would need some heavy Javascript and client's bandwidth, and it wouldn't work on IE (correct me if I'm wrong - nothing works on IE). But you could mail() or fwrite() it with ease, generating a picture with GD2 and mailing or saving it wouldn't be that hard either.
As far as I know you can't printscreen with javascript, and you couldn't then send it to your script either since you'd need to save it, then reference the file with a file input and then send the form. It's just not gonna happen. Javascript doesn't have this kind of access, and PHP definitely won't be accessing the computer to do it
Can you go into detail and say what this form does, where the data is stored, etc? A very simple modification to the code could allow you to view the code precisely as it was submitted without needing to do something as ridiculous as a screenshot. -BS
In case you want mail(); <form method="POST"> <input name="name" size="25" /> <input name="age" size="10" maxlength="2" /> <textarea name="bio" cols="50" rows="10"></textarea> <input name="submit" type="submit" /> </form> <?php if(!isset($_POST["submit"]))die(); // IF nothing is POSTed, kill the script without error message // Define variables $name = $_POST["name"]; $age = $_POST["age"]; $bio = $_POST["bio"]; if(mail("you@linuxmail.com",$name." sent you their biography",$bio)) echo "Mail sent"; // mail(email,subject,content) - IF mail is sent, echo success message, otherwise show some error ?> PHP: