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.

xcislav

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    p.children not childNodes

    childNodes will include any whitespace (left after each tag).

    http://jsfiddle.net/98s7nk7x/
  2. Like
    qq isn't 0, it's "0".
     
    You'll need to parseInt v[1] to use it as an index.
    qq = parseInt( v[1], 10 ); Edit: Sorry, I'm talking rubbish
  3. Like
    xcislav reacted to BrowserBugs in $_POST code with login and registration   
    It's a bit of a pickle here and a lot of your php is in the wrong place which will give double headers. In addition the html on the code is incorrect and although I write procedural (rather than OOP) I can't see any kind of data cleansing before inserting into the db? You might also want to look at what happens if the input field is blank, there's not conditional checks for the user and password.
     
    Try running this in a test.php simply for creating the session.
    <?php session_start(); if($_SERVER['REQUEST_METHOD']=='POST') { // If it has been posted $uname = trim($_POST['user']); $pword = trim($_POST['pass']); // Check if the fields are empty if($uname=="" || $pword=="") { $errmsg = "Please enter a username and password"; } else { $_SESSION["user"] = $uname; $_SESSION["pass"] = $pword; } } ?> <!DOCTYPE html> <html> <head> <title>Test</title> </head> <body> <?php if(isset($errmsg)) { echo "<p>" . $errmsg . "</p>"; } ?> <?php if(isset($_SESSION["user"]) && isset($_SESSION["user"])) { echo "<p>Session Set for user " . $_SESSION["user"] . " and password " . $_SESSION["pass"] . "</p>"; } ?> <form action="test.php" method="post"> <ul> <li>User: <input type="text" name="user"></li> <li>Password: <input type="pass" name="pass"></li> <li><input type="submit"></li> </ul> </form> </body> </html>

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.