kvarnerexpress 0 Report post Posted January 15, 2006 Need some help, i have been out of the HTML programming for a while, and it isn't coming back very fast for me, or this isnt possible.Can i send the contents of a form to a different place then where the browser goes. I would like to send the contents of a form to a page where it will take the data and process it, basically putting all the data into a SQL table and creating a new file for the article. I want the user to go to a different page though, actually, back to the same form where they put in the information in the first place.Possible? Share this post Link to post Share on other sites
moldboy 0 Report post Posted January 15, 2006 (edited) I don't think it's possable with HTML, but with a little PHP, you would send the form to process.php which would contain this code <?PHP//do the SQL stuff as mentioned without sending anything to to browserheader ("Location: [url=http://the]http://the[/url] address of the forum, or even use the server var regarding sending url");?> Hope this helps, I assume similar things can be done with ASP, ect. Edited January 15, 2006 by KuBi (see edit history) Share this post Link to post Share on other sites
Inspiron 0 Report post Posted January 15, 2006 Yap.. As what moldbuy has commented, it is impossible to process the data or transfer the data with HTML alone. HTML is basically just the interface and GUI of the webpage. What is working behind the scenes are the server-side scripting such as PHP, JSP, ASP etc.For your case, there is no way to even connect and relate your basic HTML page to SQL. Hence directing to a different page will be impossible. Share this post Link to post Share on other sites
Tyssen 0 Report post Posted January 15, 2006 I want the user to go to a different page though, actually, back to the same form where they put in the information in the first place.You want to look up self-referencing forms. Share this post Link to post Share on other sites
beeseven 0 Report post Posted January 15, 2006 If you make the form itself in a php file, then you could have something like this: <form method="post" action"[the file name]"> ... <input type="submit" name="submit" value="submit" /></form><?phpif($_POST['submit']){ //process the stuff}?>This will make the user come back to the form page. Also, having the if statement to check if the form has been submitted will make it so that the script doesn't process anything the first time the user enters the page. Share this post Link to post Share on other sites
moldboy 0 Report post Posted January 15, 2006 also if you do what beeseven does then you can have it check the form for competness and fill in what has already been filled in using echo's and such. Share this post Link to post Share on other sites