Jump to content

how to display message in the popup window


bindiya

Recommended Posts

I have a login modal window which is user for entering the login and password, and check it with the database.If the login and password is not there i nthe database the message shuld be displayed in the popup window itself.

But  in my case the popup window disapperas if the login details are wrong.

how shuld i code for this.

 

My code is pasted below.

<div id="cover"></div>

<div id="dialog">

 

<form action='' method='post' name='onlinepay'>

<table width="388" border=1><tr><td colspan="4" align="right"></td><td align="right"><a href="index.php" onclick="closePopUp('dialog');"><img src='images/close.jpg' align="right" /></a></td></tr>

 

 

  <tr><td width="11" ></td>

  <td width="90">Username </td>

  <td width="57">:</td>

  <td width="147"><input type='text' name='username' id='username' /></td><td width="59"></td>

  </tr>

<tr><td></td><td>Password</td><td>:</td><td><input type='text' name='password' id='password' /></td><td><input type='submit' name='submit' id='submit' value="Login" /></td></tr><tr><td colspan='5'><?php

//connection statements goes here

 

 

if(isset($_POST['submit'])){

$username=$_POST['username'];

$password=$_POST['password'];

 

 

$sql="select username,password from register where username='$username' and password='$password'";

$result=mysql_query($sql);

$row=mysql_fetch_row($result);

 

$row1=mysql_num_rows($result);

 

if(($row['0']==$username) && ($row['1']==$password)){

 

header ('Location:themes/index.php');

}

else{

  echo "Username and password doesnot match";

}

}

 

?> </td></tr>

<tr><td colspan="5"><hr color="#999999" /></td></tr><tr><td></td><td colspan='2'><a href="javascript:void window.open('themes/forgotpassword.php?fullview=Y','','height=350,width=525,resizable=yes,scrollbars=yes')">Forgot password? </a>

              </td>

  <td><a href='register.php'>New User</a></td>

  <td align='center'> </td>

</tr>

</table>

</form>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.