Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Gukkie

Members
  • Joined

  • Last visited

  1.    daniel7912 reacted to a post in a topic: PHPmyAdmin
  2. Gukkie replied to daniel7912's topic in Server Side
    heres an example.. $date = strftime("%d %b, %Y", strtotime($date));
  3. hi andyl, i have change dmy code to this and its working fine =) but it doesnt auto refresh the page, only when a user clicks on a different link does it refresh n log the user out, is there any way to auto redirect n log out instead of havin the user to click on a different link? <?php session_start(); // set timeout period in seconds $inactive = 60; // check to see if $_SESSION['timeout'] is set if(isset($_SESSION['timeout']) ) { $session_life = time() - $_SESSION['start']; if($session_life > $inactive){ $id = $_SESSION['id']; mysql_query("UPDATE myMembers SET logged_in='N' WHERE id='$id'"); // session last accessed more than 30 minutes ago session_destroy(); print "<meta http-equiv=\"refresh\" content=\"0;url=http://www.domain.com/index.php\">"; } } $_SESSION['timeout'] = time(); ?>
  4. afetr 60 seconds, when i close my browser, the database does not updat accordingly, it still shows logged_in as 'Y'
  5. its the same exact code, u gave as an example the only thing i changed was the time to 60seconds for testing it
  6. The Gator, it doesnt seem to work, i have tried putting it into my login script as well as all the pages?
  7. thanks The Gator, i was thinking of doing smth like that but do i have to put that code into everypage? as i have many pages? thanks andyl i will try to figure it out and i'd be back here if i cant =) cheers!!
  8. how'd ya do that? im not sure about cookies =(
  9. Is there anyway i can auto update a field in the database if a user logs out by closing the window and ending the session? <?php session_start(); include_once "connect_to_mysql.php"; $id = $_SESSION['id']; mysql_query("UPDATE myMembers SET logged_in='N' WHERE id='$id'"); // Destroy sessions and cookies session_destroy(); print "<meta http-equiv=\"refresh\" content=\"0;url=http://www.netdateme.com/index.php\">"; ?>
  10. Hi, i am currently making a flash header for my website, i have a login function in that header and it is connected to a php script, the problem is that i cannot get the values to pass into the flash header, my Logout function works fine without any problems but my Login doesnt, if i input the details and click login, the page does not refresh, i have to manually refresh the browser in order for it to work. Any ideas? PHP CODE: <?php if (!empty($_POST['email'])) { include_once "connect_to_mysql.php"; $email = $_POST['email']; $pass = $_POST['pass']; $remember = $_POST['remember']; // Added for the remember me feature $email = strip_tags($email); $pass = strip_tags($pass); $email = mysql_real_escape_string($email); $pass = mysql_real_escape_string($pass); $email = str_replace("`", "", $email); $pass = str_replace("`", "", $pass); $pass = md5($pass); //make query $sql = mysql_query("SELECT * FROM myMembers WHERE email='$email' AND password='$pass' AND email_activated='1'"); $login_check = mysql_num_rows($sql); if($login_check > 0){ while($row = mysql_fetch_array($sql)){ $id = $row["id"]; session_register('id'); $_SESSION['id'] = $id; $username = $row["username"]; session_register('username'); $_SESSION['username'] = $username; $email = $row["email"]; session_register('email'); $_SESSION['email'] = $email; mysql_query("UPDATE myMembers SET last_log_date=now() WHERE id='$id'"); $my_msg = "all_good"; print "return_msg=$my_msg&id=$id&username=$username"; } // close while // Remember Me Section Addition... if member has chosen to be remembered in the system if ($remember == "yes"){ setcookie("idCookie", $id, time()+60*24*60*60, "/"); // 60 days; 24 hours; 60 mins; 60secs setcookie("usernameCookie", $username, time()+60*24*60*60, "/"); // 60 days; 24 hours; 60 mins; 60secs setcookie("emailCookie", $email, time()+60*24*60*60, "/"); // 60 days; 24 hours; 60 mins; 60secs setcookie("passCookie", $pass, time()+60*24*60*60, "/"); // 60 days; 24 hours; 60 mins; 60secs } } //close second if else { $my_msg = "no_good"; print "return_msg=$my_msg"; exit(); } }// close if post ?> AS3 CODE: stop(); //email_txt.tabIndex = 1; //password_txt.tabIndex = 2; //sumbit_btn.tabIndex = 3; //////////// // Assign a variable name for our URLVariables object var variables:URLVariables = new URLVariables(); // Build the varSend variable var varSend:URLRequest = new URLRequest("http://localhost/scripts/login.php"); varSend.method = URLRequestMethod.POST; varSend.data = variables; // Build the varLoader variable var varLoader:URLLoader = new URLLoader; varLoader.dataFormat = URLLoaderDataFormat.VARIABLES; varLoader.addEventListener(Event.COMPLETE, completeHandler); // Handler for PHP script completion and return function completeHandler(event:Event):void{ status_txt.text = ""; if (event.target.data.return_msg == 'no_good') { status_txt.text = "No match in our records, please try again"; } else if (event.target.data.return_msg == 'all_good') { var reloadPage:URLRequest = new URLRequest("javascript:NewWindow=window.location.reload(); NewWindow.focus(); void(0);"); navigateToURL(reloadPage,"_self"); } } // Add an event listener for the submit button and what function to run submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend); // Validate form fields and send the variables when submit button is clicked function ValidateAndSend(event:MouseEvent):void{ // "Remember Me" addition code for the checkbox variable------------ var rememberChoice:String; ////////////////// remember me variable setup///////////// if (rememberCheckbox.currentFrame == 2) { rememberChoice = "yes"; } else { rememberChoice = "no"; } // End "Remember Me" addition code for the checkbox variable------- status_txt.text =""; //validate form fields if(!email_txt.length) { status_txt.text = "Please enter your email address."; } else if(!password_txt.length) { status_txt.text = "Please enter your password."; } else { // Ready the variables for sending variables.email = email_txt.text; variables.pass = password_txt.text; variables.remember = rememberChoice; // Added for Remember me checkbox // Send the data to the php file varLoader.load(varSend); status_txt.text = "Logging in..."; } // close else after form validation } // Close ValidateAndSend function //////////////////////////////////////////////////////////////

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.