Jul 25, 2008

Sending Forms To A Different Location

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

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.
Confirm Code:

Similar Topics

Keywords : sending forms location

  1. Dynamic Forms Help - How Do I Create These? - (8)
  2. Xhtml Forms Layout - all within the standars (8)
    We all remember the good old tables right? When we used them to design or beloved websites. But
    nowadays things have change a little bit, strict code format, css, xhtml and no tables. And so
    when it comes finally to the design of a form, instead of having two rows (left row with the label
    and right row with the input tag) and those rows aligned to look nice (left row= right aligned and
    right row=left aligned), how can we keep order with our fancy style sheet? Thanks in advance....
  3. Substitute Form Button For An Image - homemade images in forms buttons (3)
    Hi, I have the next formular : CODE  <form method='post'
    action='index.php?mode=2&id=1'>                <input type='hidden'
    name='name' value='Canon Digital Ixus 700'/>                <input
    type='hidden' name='id' value='1'/>                <input
    type='hidden' name='qty' value='1'>                <input
    type='hidden' name='cost' value='40'>                <input
    type='submit' value='Add to ca...



Looking for sending, forms, location

Searching Video's for sending, forms, location
advertisement



Sending Forms To A Different Location



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
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