Jump to content

Search the Community

Showing results for tags 'error php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. ( ! ) Warning: Creating default object from empty value in C:\wamp64(1)\www\wp-admin\includes\post.php on line 736 Call Stack #Time Memory Function Location 10.000 2412048 {main}( ) ...\post-new.php:0 24.3740 35068232 get_default_post_to_edit( ) ...\post-new.php:66 ( ! ) Warning: Invalid argument supplied for foreach() in C:\wamp64(1)\www\wp-content\plugins\wordpress-seo\admin\metabox\class-metabox.php on line 1091 Call Stack #TimeMemoryFunctionLocation 10.0002412048{main}( )...\post-new.php:0 24.411935106496require( 'C:\wamp64(1)\www\wp-admin\edit-form-blocks.php' )...\post-new.php:72 35.106438351368require_once( 'C:\wamp64(1)\www\wp-admin\admin-header.php' )...\edit-form-blocks.php:289 45.111138354472do_action( )...\admin-header.php:102 55.111138354848WP_Hook->do_action( )...\plugin.php:470 65.111138354848WP_Hook->apply_filters( )...\class-wp-hook.php:327 75.143438608816WPSEO_Metabox->enqueue( )...\class-wp-hook.php:303 85.161838620416WPSEO_Metabox->get_replace_vars( )...\class-metabox.php:873 95.166338625088WPSEO_Metabox->get_custom_replace_vars( )...\class-metabox.php:1003 105.166338625088WPSEO_Metabox->get_custom_fields_replace_vars( )...\class-metabox.php:1038 Can someone please help me solve this bug, on clicking on the 'new page' section of my wordpress dashboard, it keeps showing this. Please, what is wrong?
  2. Hi, I'm currently having an issue with validating my login script, it only appears that one part of it actually works! I have a simple login form with a username and password field and login button. At the moment if I enter nothing into the login form (nothing for both username and password), it logs in as an unregistered user with no ID and my error message is displayed. If I enter an unregistered username with no password the same thing happens. If I enter an unregistered username with a random password there is no log in which is good, but my error message is not displayed. If I enter a registered username and password into the form, it logs in with the correct ID and no error message is displayed, which is good. If I enter a random password with nothing in the username it does not log in which is good and the error message is displayed as it should. How can I get it so that all of these login attempts are coded so that it always results in the last case if an unregistered user is entered and / or missing details are entered into the form? Form and Validation Code <?php if ($_SESSION['loggedin'] == true){ echo "You are logged in as ";?><b><?php echo $_SESSION['username']?></b><?php echo " ["; echo $_SESSION['id']; echo "]"; ?> <a href="logout.php">Logout</a> <?php }else{ echo "<p><b>Login:</b></p>\n"; ?> <form name="loginform" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <b>Username:</b> <input type="text" name="liusername"> <b>Password:</b> <input type="password" name="lipassword"> <input type="submit" name="lisubmit" value="Login"> </form> <?php } if ($_SESSION['loggedin'] == true); if (empty($_POST) === false) { $username = $_POST['liusername']; $password = $_POST['lipassword']; if (empty($username) === true || empty($password) === true) { ?><br /><font color="red"><?php echo 'ERROR: You need to enter a username and password!'; } } ?> Login Code <?php if (isset($_POST['lisubmit'])){ $query = "SELECT user_id, user_password FROM user WHERE user_username = '".$_POST['liusername']."'"; // Select details from user table $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); if ($row['user_password'] == $_POST['lipassword']) { $_SESSION['loggedin'] = true; $_SESSION['id'] = $row['user_id']; $_SESSION['username'] = $_POST['liusername']; } else { $_SESSION['loggedin'] = false; $_SESSION['id'] = 0; } } ?> Thank you in advance for any help.
×
×
  • 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.