943,553 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Apr 10th, 2007
0

I have a form problem

Expand Post »
I have a form on my webpage, Its not inputing the data to the text file and when i click submit there is an error page. What should I do?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
klouis is offline Offline
4 posts
since Apr 2007
Apr 10th, 2007
0

Re: I have a form problem

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 ;-)
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
rgtaylor is offline Offline
83 posts
since Mar 2007
Apr 10th, 2007
0

Re: I have a form problem

Click to Expand / Collapse  Quote originally posted by rgtaylor ...
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 ;-)
Well my problem is that I have a form on my webpage, I am trying to get contact information from clients. I am having trouble having the data saved. I was wondering what I should do.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
klouis is offline Offline
4 posts
since Apr 2007
Apr 10th, 2007
0

Re: I have a form problem

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,
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
rgtaylor is offline Offline
83 posts
since Mar 2007
Apr 10th, 2007
0

Re: I have a form problem

Click to Expand / Collapse  Quote originally posted by rgtaylor ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
klouis is offline Offline
4 posts
since Apr 2007
Apr 10th, 2007
0

Re: I have a form problem

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...
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
rgtaylor is offline Offline
83 posts
since Mar 2007
Apr 10th, 2007
0

Re: I have a form problem

Click to Expand / Collapse  Quote originally posted by rgtaylor ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
klouis is offline Offline
4 posts
since Apr 2007
Apr 11th, 2007
0

Re: I have a form problem

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.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Apr 11th, 2007
0

Re: I have a form problem

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,
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
rgtaylor is offline Offline
83 posts
since Mar 2007
Apr 11th, 2007
0

Re: I have a form problem

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.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Error: uncaught exception: Permission denied to call method XMLHttpRequest.open
Next Thread in HTML and CSS Forum Timeline: LayOut Trouble





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC