| | |
I have a form problem
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2007
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
Sorry, I don' fully understand what you are saying. Perhaps a little more info would be helpful.
What is your form trying to submit?
What text file are you talking about, do you mean text field?
What error are you getting?
What does your form do when submit?
I wanna help ;-)
•
•
Join Date: Mar 2007
Posts: 83
Reputation:
Solved Threads: 2
OK,
How are you trying to save the data?
I expect you will have a DB, text file or e-mail integration on the server to handle this...
What is the error? Is the data being submit to the server correctly and the server script is throwing an error, or is the web page is throwing an error prior to submit....
Peace,
How are you trying to save the data?
I expect you will have a DB, text file or e-mail integration on the server to handle this...
What is the error? Is the data being submit to the server correctly and the server script is throwing an error, or is the web page is throwing an error prior to submit....
Peace,
•
•
Join Date: Apr 2007
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
OK,
How are you trying to save the data?
I expect you will have a DB, text file or e-mail integration on the server to handle this...
What is the error? Is the data being submit to the server correctly and the server script is throwing an error, or is the web page is throwing an error prior to submit....
Peace,
Yes there is a textfile on my server. I have also tried to use dreamweaver and frontpage both to edit. But both still come back that its not saving. And still kicks an error at me.
Cheers
•
•
Join Date: Mar 2007
Posts: 83
Reputation:
Solved Threads: 2
And what are you using to write to the text file on the server? Java, PHP, etc...
Remember two very important things, 1) you must have write access to the folder and file on the server for the account the script doing the writting is running under... this is a common error... 2) you must open the file in either append or write mode depending on your needs before you can write to it... if your opening the file in read mode, which is often the default, then you will get an error when you try to write to it...
Remember two very important things, 1) you must have write access to the folder and file on the server for the account the script doing the writting is running under... this is a common error... 2) you must open the file in either append or write mode depending on your needs before you can write to it... if your opening the file in read mode, which is often the default, then you will get an error when you try to write to it...
•
•
Join Date: Apr 2007
Posts: 4
Reputation:
Solved Threads: 0
•
•
•
•
And what are you using to write to the text file on the server? Java, PHP, etc...
Remember two very important things, 1) you must have write access to the folder and file on the server for the account the script doing the writting is running under... this is a common error... 2) you must open the file in either append or write mode depending on your needs before you can write to it... if your opening the file in read mode, which is often the default, then you will get an error when you try to write to it...
Everything right now is in HTML. The script is all set I even checked in dreamweaver. The text file properties are also set to archieve.
You need to write some kind of program to run on the server; that accepts the data submitted in the form and outputs it to the text file. Such a program might only be a couple of lines long; but it needs to be there.
This program needs to be stored on your server in a publicly accessible folder with execute permissions ( I can't give any specific tips without knowing your server OS, and what lang you'd want to write the program in; but putting the program in the cgi-bin folder if you have one is usually a good way to give it execute permissions implicitly ). You then set the form's action attribute to the URL for your program.
For writing the program; if you use a scripting language like Perl, PHP ( or ASP if you have a windows server ); then you won't need any special tools other than a text editor and an FTP client.
Do some research into CGI ( the common gateway interface, which is a part of the means by which form submissions are sent to programs ), the languages PHP, Perl, and/or ASP, and file access in those languages.
This program needs to be stored on your server in a publicly accessible folder with execute permissions ( I can't give any specific tips without knowing your server OS, and what lang you'd want to write the program in; but putting the program in the cgi-bin folder if you have one is usually a good way to give it execute permissions implicitly ). You then set the form's action attribute to the URL for your program.
For writing the program; if you use a scripting language like Perl, PHP ( or ASP if you have a windows server ); then you won't need any special tools other than a text editor and an FTP client.
Do some research into CGI ( the common gateway interface, which is a part of the means by which form submissions are sent to programs ), the languages PHP, Perl, and/or ASP, and file access in those languages.
Plato forgot the nullahedron..
•
•
Join Date: Mar 2007
Posts: 83
Reputation:
Solved Threads: 2
Air is a drug, and we're all addicted to it ;-)
OK, thanks, that is where I was trying to go here... I suspected that you didn't have anything running on the server to write the data to the file...
Javascript and HTML only run on the client machine, that means in the browser of ther person who is viewing the site... we'll not get into server side Javascript just now, but basically he's right, something on the server has to process the form data otherwise it is like throwing it out into the abyss and expecting to know where it went...
No browser can write files to your server for you, the server must do that itself...
By the way, you can run ASP files in Apache if you load the ASP library... the question is... "Why would you...?" ;-) You can also run PHP, Perl, etc. on a Windows server, but the questions is again... "Why would you...?".....
Peace,
OK, thanks, that is where I was trying to go here... I suspected that you didn't have anything running on the server to write the data to the file...
Javascript and HTML only run on the client machine, that means in the browser of ther person who is viewing the site... we'll not get into server side Javascript just now, but basically he's right, something on the server has to process the form data otherwise it is like throwing it out into the abyss and expecting to know where it went...
No browser can write files to your server for you, the server must do that itself...
By the way, you can run ASP files in Apache if you load the ASP library... the question is... "Why would you...?" ;-) You can also run PHP, Perl, etc. on a Windows server, but the questions is again... "Why would you...?".....
Peace,
I'd be more inclined to run Perl on Windows than I would be to run ASP on *nix ^_-
Java is a good bet for sure-fire compatibility; but, to the original poster, you'll need to know and understand the difference between compiled programs and source code. I suppose, the main advantage ( and strangely the main disadvantage ) with PHP/Perl etc, is that the source code is the program.
Unfortunately, I've never found a good "beginners tutorial" to CGI, that isn't focussed on a specific language, too complicated, or too empty of substance; The best advice I have is to Google "CGI" or "form handling", and follow links until you have enough information to do what it is that you need to do.
Java is a good bet for sure-fire compatibility; but, to the original poster, you'll need to know and understand the difference between compiled programs and source code. I suppose, the main advantage ( and strangely the main disadvantage ) with PHP/Perl etc, is that the source code is the program.
Unfortunately, I've never found a good "beginners tutorial" to CGI, that isn't focussed on a specific language, too complicated, or too empty of substance; The best advice I have is to Google "CGI" or "form handling", and follow links until you have enough information to do what it is that you need to do.
Plato forgot the nullahedron..
![]() |
Similar Threads
- Form Problem (JavaScript / DHTML / AJAX)
- Not sending Feedback Form (PHP)
- Form Fields (JavaScript / DHTML / AJAX)
- email form problem (Web Hosting Deals)
- asp form problem (ASP)
Other Threads in the HTML and CSS Forum
- Previous Thread: Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
- Next Thread: LayOut Trouble
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form google griefers hackers hitcounter hover html ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping swf swf. textcolor timecolor titletags url urlseparatedwords visualization web webdevelopment webform website windows7






