0

Hey
I'm having a bit of trouble. I am currently learning php and mysql to access my servers database and collect data. In which i want to use a username and password form. However in the meen time i would like to create one using plain html and javascript most likely as forms using the if and else. I am quite experienced with javascript, although i have forgotten how to load variables from an external .txt file. Otherwise my users would simply be able to view my source code and see the username and password they need to type.

Any help on this is greatly appreciated

thanks

3
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by MidiMagic
0

If they can see your js file, they can also read the txt file.

Also, JavaScript has no way to read server files, because it runs on the client computer, not the server.

Reading a file used to be possible, but it is now a security violation.

0

> Also, JavaScript has no way to read server files
Not entirely true. You can read an XML file on the server using the XML DOM API. But this applies for only valid XML files.

0

ok, thats great thanks people. I will use actionscript in flash to start but bring php and mysql in when i know more on php....still learning lol

0

> Also, JavaScript has no way to read server files
Not entirely true. You can read an XML file on the server using the XML DOM API. But this applies for only valid XML files.

Thanks. That's nice to know for future reference.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.