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.

Spratters53

Members
  • Joined

  • Last visited

  1. The solution to this, which i just found, was that the <?php tag had a line break in front of it, so the code was starting on line 2. Why that causes a problem I don't know but that was the solution.
  2. So i've posted this question elsewhere but haven't found any suitable answers yet. I'm trying to create a website found here - r3gamers.com (you can head there to test this problem if you want). I've created a login page which works (as far as i can tell, properly) using cookies. <?php if ($_SERVER['REQUEST_METHOD'] == 'POST'){ require_once ('LoginFunctions.inc.php'); require_once ('Connection.php'); list ($check, $data) = check_login($dbc, $_POST['Username'], $_POST['Password']); if ($check) { setcookie('Username', $data['Username'], time()+60*60*24*90, '/', '', 0, 0); header('Location: index.php'); } else { $errors = $data; } } include('LoginPage.inc.php') ?> This is the page that is giving me a problem though, the logout page. <?php require_once ('Connection.php'); header('Refresh: 0;'); if (!isset($_COOKIE['Username'])){ header('Location: LoginFunctions.php'); } else { setcookie('Username', '', time()-60*60*24*90, '/', '', 0, 0); unset($_COOKIE['Username']); header('Location: index.php'); } ?> As far as i can tell, i'm both setting and unsetting the cookie properly, however the cookie never deletes. It always stays active. It's worth mentioning that this problem only occurs on my live domain (hosted through godaddy.com). When testing this through netbeans, it works fine. The problem occurs on all web browsers too. "Solutions" that have been given but ineffective so far have been - Set value to null Set path to '/' Redirect using an HTML header, rather than php header. None of these worked, all leaving me with the same problem; that i either don't log out at all or that i log out only on the redirected page but the cookie is never deleted, so on the next page the cookie takes effect again. I've been trying to solve this for a couple days now but had no luck. I could really do with some help.

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.