Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture Information

Status
Not open for further replies.

alfie002

Technical User
Mar 3, 2004
121
GB
Hello All,

I am fairly new to the HTML world. I have a general question rather than a technical. I want to capture information from the user, via the keyboard, and write this information to a file on disk. Also, I would like to be able to read the information from the file on disk and display on the screen in HTML ??

What would be the best approach for this ?

thanks

Alf
 
Hi Alfie, I assume you mean you want a user to fill in a form and then you collect this information and add to a database? If so you are going to need some sort of server side scripting (ASP, PHP etc...).

You can then use your chosen server language to display the results on a browser (in html).

Cheers

Nick
 
hello Nickdel,

thanks for the response. Nickdel, sort off. I want to be able to capture information from the user, write it to a formatted file on disk. Then have the abilility to re-read this file and display on screen.

Does your recommendation still apply ?

Many thanks

Alf
 
Pretty much, not sure what you mean by formatted file but certainly with ASP you can read/write from text files etc...

Nick
 
ok Nickdel,

fixed format eg:


variable=datavalue
variable=datavalue


I'll give the ASP a go.

Many thanks

Alf
 
Ideally you should put all this into an XML file and then it is possible to read and write (writting I have never done this but apparently you can!) this using Javascript.

Just another angle however I would say simpliest way would be to use server scripting.

Nick
 
nickdel -> is that right you can write to files on a clients machine using JavaScript?

i thought the ONLY thing you can do interms of accessing any sort of file system via a client browser was using cookies otherwise this is potentially a serious security risk?

is this not the case?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
1DMF, your quite right. Sorry, I wasn't very clear before. I actually meant write the XML code using Javascript but then passing this as a string to the server.

Have saw a few AJAX apps do this!

Nick
 
ah , AJAX!

either way they will need some server side code to process the data / AJAX request.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top