0

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.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by amie900218
0

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

This question has already been answered. 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.