0

How can i save values from a form when i click submit without using PHP.

<form method="post" name="myform">
<p><input name="login" placeholder="Username" type="text"></p>
<p><input name="pass" placeholder="Password" type="password"></p>
<input name="submit" id="submit" onclick="show_alert();" value="submit" type="submit">
</form>

If text file is not possible. then tell me about any other way to store the data without using PHP. And kindly tell the easiest way possible.

I tried to find whole night but failed.

Thanks !

8
  • Store where? You can store it only in the cookies (up to 4 KB) or local storage of the browser.. What is the purpose of such storage if the data does not go anywhere except of that browser? You can use, of course, side services which work with client forms, if you find such services. Commented Oct 2, 2014 at 4:03
  • You can store the data as cookie on a client's computer. Achievable via Javascript. Though I'm unable to understand why don't you want to use PHP (or any server-side language for that matter). Commented Oct 2, 2014 at 4:03
  • why are you tagging PHP if you do not want PHP? this question is super duper broad Commented Oct 2, 2014 at 4:04
  • 2
    without using PHP specifically or without using any server-side language? Cause if that's the case you can only save it client-side, cookies is an option. Commented Oct 2, 2014 at 4:04
  • i want to store user accounts just for my own use. not in cookies. i want to access them when i put the form in a usb and insert on any pc. i want to login from a account given in a text file. Commented Oct 2, 2014 at 4:10

1 Answer 1

1

It's not possible without having a script language behind, which has access to the file system. Due to security reasons javascript can't write files by itself. It's possible to use the local storage of the browser or cookies to save data just for yourself, but both will require the used device / browser.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.