Jump to content
xisto Community
Sign in to follow this  
YudzzY

Submit Button Help how to save/send data when submitting

Recommended Posts

I done a form data that when i click submit ought to be saved on the server/or sent to my email as per my choice, but none happens. i did the html form in MS Publisher and the submit button has command: .../index_files/--WEBBOT-SELF--the help says to check if ISP has front page ssl 2.0 (or something close). hmm, what do i do?

Share this post


Link to post
Share on other sites

Sorry, but you are making no sense. Publisher is not the program you should use IN ANY INSTANCE to create a webpage. And a webbot is nothing to do with form submit.And the front page ssl 2.0 is jargon for, does the host have frontpage extension support (i think).

Share this post


Link to post
Share on other sites

You should have a form that tells the HTML how to handle the form in the very beginning of the form it should look like the below, you just need to fill in the proper information.

<form action="processform.xxx" method ="post"><code ........................................more code><input type="submit" value ="process"></form>

Now you will need a program that will process this form and send e-mail to you with the processed results that part is up to you and in th above example the processform.xxx will be replaced by whatever program you want to process the file, that is where your problem is since you said that your form action referred to a robot or something else that couldn't work. You need a file that will take the posted information that is in the named fields of the form and do something with it.

Share this post


Link to post
Share on other sites

okay, that was a little helpful Houdini, but if you can, can i get a complete sample coding of a working form. and instead of emailing, if it can save to a file on the server will be good too! and 'guy', you think you are too smart, why dont you get me something that could actually help out rather than showing how 'high-knowledge' person you are, which you arent from any point of my view! "Publisher is not the program in any instance for webpages???" lol have you used publisher? if not, then i think you should keep that thing shut! else, try using it! its good for dummies like me.. lol.. and better for dummier ppl like you ;-) no offence but.. i dont think you were trying to help me, rather than getting posts credits.. lol

Share this post


Link to post
Share on other sites

Hey Yudzzy, you have to include more information to make people able to help you otherwise they can just guess and if that doesn't help you, you might also think about what you did wrong. But well, let me try my part:

You are trying to send information from a form field to a script which is supposed to save the information somewhere, right? Did you write that script yourself?

Could we see the source code for the page with the submit form on it?

A working example of a form (in HTML):

<form action="script.php" method="post" name="FormName">  	<input type="text" name="textfieldName" size="24" />  	<input type="submit" name="submitButtonName" value="submitButtonLabel" />  </form>
I do not believe that the submit button can make any problems. It just has to be type="submit".

You have to ensure that there is a working script at the other end.

If you want really useful help for your problem, then you have to provide us with more information!

// Ruben

Share this post


Link to post
Share on other sites

OK, lets take this step by step.

 

First, MS Publisher does have the capability to produce web pages but lacks the ability to create a script to handle the form request. Actually, Publisher does a fairly decent job of outputing HTML especially for new website creators. It It is very limited in it's overall usability but if you don't have a better wysiwyg and don't know HTML, go with what you have.

 

Second, "--WEBBOT-SELF--" is more than likely a prompt for the actual file that should be used to handle the request from the from. Otherwise, it is an internal script engine designed to perform simple and common form requests. Whatever the reasoning for Publisher inserting that command there, it really should be the file path of a working script that was designed to handle the form request.

 

Third, you'll need some type of handler in nearly all form requests. This is usually some file that resides on your server that is expecting the various information that your form will send to it. Any information it isn't expecting will simply be ignored in most cases. There are a few ways to use JavaScript to handle the from request and output a result but this is infrequent.

[/hr]

Here is a baisc fow of information through a form.

The web page with the form on it is loaded.

The user fills in the form and clicks the submit button

The form sends all of the information that the user filled in to a script on the server that was writen to handle that specific form.

The script on the server gathers the information sent by the form and prepares it for processing.

The script then performs whatever task it was designed to do with the submitted information and returns a result.

The result may be to send an email, load a new page with the user submitted information, save the information to a database or file, or a combination of those options.

[/hr]

As an example of how all of this works, I'll describe the process of posting a reply in this forum.

Member reads a post and then clicks the reply button.

The reply button is actually a renamed submit button for an invisible form that already contains your username, the name of the topic, and the post that is being replied to.

The invisible form then sends the reply request to a PHP script on the server and forwards all of that invisible information to the script.

The script then generates the reply form and inserts the quoted post from the post being replied to if that option was used.

The member fills in the form with his reply, and chooses whatever options he wishes.

Then when the submit button is clicked, the reply and all of the other information is sent to another PHP script that adds the reply to the database, increases the members post count, informs topic subscribers of the new reply, moves the topic to the top of the list of topics in the category, increases the members hosting credits the correct amount for the size of the post and then generates the new topic page with the reply at the bottom.

[/hr]

As you should realize by now, if you don't have some type of script at the end of that request, nothing will happen. It is like calling another house that doesn't have a phone connected. You'll just ring and ring but the server won't answer.

 

If you want to be able to use forms on your website to allow users to send you information, you'll need to do one of two things.

Learn to write the kind of scripts required to handle form requests.

Find a prewriten script that will handle the form requests.

Since I assume that you are still kind of new to the world of web publishing, I think it would be best for now to locate a prewritten script for your needs. There are hundreds of scripts other people have already written that are free to use if you know where to look.

 

For Perl scripts, I suggest the CGI Resource Index:

http://cgi.resourceindex.com/

 

For PHP scripts, I suggest the PHP Resource Index:

http://php.resourceindex.com/

 

There are other places to get scripts but you should find what you need here.

 

I recommend going with PHP because it will be easier for you to learn from and Perl scripts are less likely to be supported by your service provider.

[/hr]

These scripts can be very simple for a mailto script that just emails the information to you or very complex for a database program that adds, modifies, searches database entries.

 

I hope that this will give you a better idea of what you'll need to successfully add forms to your website.

[/hr]

Good Luck. ;)

 

vujsa

Share this post


Link to post
Share on other sites

Good expalination vujsa and the links ought to help them get going with their site, but there is however a little more that happens with a post with Invision, when the post is submitted or previewed it is parsed into HTML for display, and when submitted it is stored as IB Code in the database. When you click a link of a post it is fetched from the database then reparsed back into HTML.

 

If a user clicks to edit a post (possible here but difficult) then the HTML that shows in the messsage text area is then reconverted into IB Code for the editing process, and whan submitted the altered post takes the place of the IB Code that was stored on the database.

Share this post


Link to post
Share on other sites

okay, that was a little helpful Houdini, but if you can, can i get a complete sample coding of a working form. and instead of emailing, if it can save to a file on the server will be good too!

 

and 'guy', you think you are too smart, why dont you get me something that could actually help out rather than showing how 'high-knowledge' person you are, which you arent from any point of my view! "Publisher is not the program in any instance for webpages???" lol have you used publisher? if not, then i think you should keep that thing shut! else, try using it! its good for dummies like me.. lol.. and better for dummier ppl like you ;-)

First of all, as Ruben explained, as you did not put enough information, I couldn't understand your request, therefore, I found no reason to put any helpful information. If I appeared blunt or rude, then I appologise. Next, I have tried Publisher, Word and a lot more office tools to make webpages and they simply did not have the power to make "good-enough" webpages, the output may be almost standard, but they do not have the speciality that is needed. Try using a WYSIWYG editor, one that gives you the functionality of Publisher and the power of true web-designing. For beginners, I would suggest Namo WebEditor or NetObjects Fusion (just google the terms), alternatively, you could find tutorials on the net on how to use Dreamweaver. All of the software I have mentioned comes with a 30-day free trial, so you can decide which one is best. The reason Publisher, Word and other office applications shouldn't be used, is that they are mainly for Print. Publisher is short for Desktop Publishing, mainly used for printed documents. It was designed to be only partially usable for the Internet, and Word, is just the same, but harder to use.

 

As for your original request, I think vujsa explained it well.

 

A great resource for scripts is http://www.hotscripts.com/ just navigate around it and you should find what you are looking for.

 

A slightly detailed tutorial on using PHP can be found at http://www.w3schools.com/ click on the PHP on the menu and it should get you started.

Share this post


Link to post
Share on other sites

Vujsa good explanation as usual but if I may I'd like to make a suggestion here.WUSIWYG editors are great, and if your on a Server with FrontPage extentions and the rest of the stuff FrontPage needs to do its thing then it is a halfway decent editor to start with...IMHO. Its how I started out with form building and what not, but before anyone starts a good natured discussion over its many weaknesses and dirty code, please let me state that no matter what WYSIWYG editor you may or may not chose to use never forget that you should do your best to learn how to code on your own, nothing beats having a binder full of notes and a good knowledge base since there are certain things that no WYSIWYG editor can do.Now that Webot entery is just a place holder so that you can enter your own script to be able to send/save the contents of the feild as you see fit. Publisher is giving you the basic code and is letting you know where to put in the code/script that you need to be able to complete what your trying to do.Vujsa and Guy have put up a couple of very good links where you can find and research the scripts you need. Good luck and hope your able to get your form working. Please let us know.

Share this post


Link to post
Share on other sites

yes i read that yesterday, and i was impressed by the quality of response and i actually need to check out those scripts and implement them. ruben: just your code what you wrote, is it enough to make the form work? of course the scripts too! if i can get the meaning of each commands that would be helpful, like form action = script.php does what etc.vujsa: thats so helpful of you, i will try it and get back to you? it will take some time to get the things work perfectly..but thats a hella explanation.. hats off guy: thanks for the links, you were better this time ;) and i will try those you said aboutlogan: thanks for your suggesting but i'm more into other computer stuffs than programming, but i will take it into consideration! i appreciate the help :-D

Share this post


Link to post
Share on other sites

YudzzYno prob man I know how it goes...I started out with just hardware and system buildups myself...now I'm branching out to OS's, like Linux/Unix and also Solaris 10 (yes I know its a flavor of unix but its one I'm focusing on right now). Also I'm trying to learn PHP, Java, and C#...whew I'm busy in my down time from work...and I try to get some gaming in on BF2, StarCraft, Guild Wars and visit with friends...ok now I know I'm a Techno Geek...lol

Share this post


Link to post
Share on other sites

The Form element has only three attributes. They are ACTION METHOD and ENCTYPE and only one is required for the form to be useful. The ACTION specifies the URL of a CGI script or a mailto link that will in the case of a script process the name=>value pairs of your form and render this data in a form that you can deal with or if you want to experiment in the ACTION just put your own email link in there in the form of

<form method="post"  action="mailto:yourname@yoursite.com" enctype="text/plain"><input type=text  name=your_comments><input type=submit value="Submit Your Comments"></form>
The default of ENCTYPE is "application/x-www-form-unencoded' which is why in the code listed above that the enctype was set to test/plain for the email. Also there are ony two METHODS GET (the default, sends the data in the URL and is limited) and POST (it sends the data in the body of the submission and can send more data than a URL).

 

Now make your little test form with a mailto as shown above and you will get an email with one long string with a name followed by the value that was entered into that name field of the form, then another form name also followed by whatever data was entered into that name field and so on. Needless to say this is not very pretty and hard to read.

 

So using a CGI script or I would use PHP it can be programmed to take these name value pairs and present them in a fashion that is easy for you to read and makes some sense. If you would do a search for form scripts or if you want you could try this link HERE

and see if there are some scripts that you find useful for your application. I hope that will help you out a little bit, but you need to learn more about the FORM element itself and understand its intended purpose which is to send data via the form to the WEB server with the action being either a CGI script that will then process the form data a name=>value pairs or as a mailto link that will send all the name=> value pairs to an email address in one string (bot very useful if you get a bunch of form submissions because it is so hard to read).

 

This is one drawback of using a WYSIWYG you can create a great looking form but if you don't understand what a form is for and what to do with the form data then you only end up with a great looking form that might not do anything becuase you didn't define a program to process or mailto to send the data to.

Share this post


Link to post
Share on other sites

hey you guys are so helpful!i was really busy with the previous days, and i wondered how it would have gone if you guys hadnt helped me!the script link your provided helped me a lot. i went through some of those scripts, and worked out with them, tested them, tried to modify them to my likes, and with much hard work and understanding i got how they function. then i added on and merged it with my original page, and tested it online and wouuwww it works! first i tried to run the script offline, lol so stupid of me, and the computer couldnt process the php file, and i thought this script has some bugs, so i tried a next script, and same with that one... i tested like 4-5 scripts, and i wondered maybe they work when online, and lol.. i tried it online and bingo it worked, i even received the email in my inbox, and now that works perfectly!all credits to you guys for helping: guy, Houdini, ruben, Logan Deathbringer, and specially vujsa for that detailed post and the script links!to be honest, i didnt knw that those scripts realy exists.. now i'll check them out all and enhance the website ;-)

Share this post


Link to post
Share on other sites
how to trasfer the Username from submit page to another pageSubmit Button Help

Please tell me how to transfer the Userid or UserName whatever in submit page to anotherpage.

                            Thank u .

-reply by praveen

Share this post


Link to post
Share on other sites

I Want code for submit button in lua   technology

Steps

1) I took the Four labels and four Textboxes and one Submit button

2) I Have to Submit the all these fields  please sent me code for Submit button

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.