Jump to content

abhasgupta88

New Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

abhasgupta88's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This will only work on a Windows Server. Please ensure you're using a windows server and not a linux server for this to work.
  2. Thank you for your input. This seemed the logical thing to do, and I did try it, but doesn't seem to work. The popup doesn't open. The function is being called however, I checked using an alert prompt.
  3. Thanks for your help and advice Right now I'm running a deadline, so will probably revert to old-school php, and meanwhile I'll try to learn and understand how to implement AJAX, and will gradually port my code to it. I'm not a professional programmer per say, and at times I find it difficult to learn new methodologies and techniques, and that has always been the reason I've never got the hang of AJAX till now.
  4. I have never understood how to use Ajax. It has always been my weakness. I won't be able to implement what you said without help. I'm mostly a php/mysql programmer, doing projects as a hobby/for my own business. I'll probably just use plain php to check for the session variable and redirect to the login page (I'll have to discard the login popup idea).
  5. Hi, I have a php code and I'm trying to implement a login functionality using jquery data-popup. Currently, it works when I click a button: <a href="#" data-popup=".popup-login" class="open-popup"><img src="images/icons/blue/lock.png" alt="" title="" /><span>LOGIN</span></a> What I want is that this popup should open automatically when a certain condition is met. $login = $_REQUEST['login']; if (!isset($_SESSION['employee_id'])) { if ($login=="success"); else if ($login=="fail") { // OPEN THE POPUP AGAIN } } This is the HTML of the login form that pops up: <!-- Login Popup --> <div class="popup popup-login"> <div class="content-block"> <h4>LOGIN</h4> <div class="loginform"> <form id="LoginForm" method="post" action="login.php"> <input type="text" name="username" value="" class="form_input required" placeholder="username" /> <input type="password" name="password" value="" class="form_input required" placeholder="password" /> <div class="forgot_pass"><a href="#" data-popup=".popup-forgot" class="open-popup">Forgot Password?</a></div> <input type="submit" name="submit" class="form_submit" id="submit" value="SIGN IN" /> </form> </div> </div> </div> What I want is, if the session variable is not available, and the login is incorrect, the popup box should keep appearing, so that the user does not have access to anything else. I am not very experienced with jquery, and I cannot figure out how I can make the login box appear automatically if the $login variable is "fail". Any help would be appreciated.
  6. in the ajax "url" instead of http://localhost:8081/test.php just use test.php and try.
×
×
  • 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.