hello,
need help from you guys.
ok, i have create a prompt box that will ask user to enter a password, and this prompt box will take user to secured page.

<script type="text/javascript">
function show_prompt()
{
var name=prompt("Please enter your password","Fill Here");
if (name!=null && name!="")
  {
  location.href="index.php";
  
  }
}


</script>

so, how to create a variable that can take password from mysql using js?

if (password=="password in database")<< how to call password from database?
{
   location.href="index.php";
}

i hope you guys can help me. appreciate it so much.

Recommended Answers

All 2 Replies

Member Avatar for diafol

You've posted js code in a php forum. Unless you use ajax, you can't call data from a DB. If you want JS, post to that forum. If you want help with your php, try coding in it and post back here when you get stuck. If you don't know what the hell I'm talking about, try searching for a login script. There are thousands on the internet. Google's a wonderful invention...

ok..tq,my bad..

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.