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

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.

> 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.

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

> 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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.