Sending Forms To A Different Location

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

Sending Forms To A Different Location

kvarnerexpress
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?

Reply

moldboy
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
CODE

<?PHP
//do the SQL stuff as mentioned without sending anything to to browser
header ("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.

Reply

Inspiron
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.

Reply

Tyssen
QUOTE(kvarnerexpress @ Jan 15 2006, 11:52 AM)
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.

Reply

beeseven
If you make the form itself in a php file, then you could have something like this:
CODE
<form method="post" action"[the file name]">
 ...
 <input type="submit" name="submit" value="submit" />
</form>
<?php
if($_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.

Reply

moldboy
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.


*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for sending, forms, location

*MORE FROM TRAP17.COM*
advertisement



Sending Forms To A Different Location



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE