database - Wordpress include('wordpress/wp-blog-header.php') -


i have website simple login. user enters username , password , clicks login button sends post data separate php file accesses , checks input database. process works fine.

however, have code displays recent post wordpress blog in same server location (/public_html). when add include('wordpress/wp-blog-header.php') breaks login system stating username , password database -the details used access it- (not user input) wrong. i've made sure not inputting wrong credentials. ideas why may occur?

my code login follows:

//if user visits page first time - no status set if(!isset($_session['status']) || $_session['status'] == null ) {  $login = "<h1> login <small style='color:#e54fbf'> enter credentials </small></h1>     <p>         <label for='memberid'>member id: </label>         <input type='text' name='memberid' required />     </p>      <p>         <label for='memberpassword'>password: </label>         <input type='password' name='memberpassword' required />     </p>      <p>         <input type='submit' id='submit2' value='login' name='submit2' />     </p>"; 

this code login part. on submit called:

if($_post && !empty($_post['memberid']) && !empty($_post['memberpassword'])) {  $response = $membership->validate_user($_post['memberid'], $_post['memberpassword']); } 

as stated, code works flawlessly without include. issue? receive errors username , password accessing database (not user entered details) incorrect - aren't! guess somewhere being reassigned have no idea why.

any appreciated. thank in advance!

thanks guys - steve hit nail on head. caused because of variable name conflicts! cheers!


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -