Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8938571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:39:23+00:00 2026-06-15T10:39:23+00:00

I have no idea why this is acting this way, I did echo out

  • 0

I have no idea why this is acting this way, I did echo out $sqll in my code and it shows all the right information but when it goes back to the page with the information it is blank.

Here is the script

<?php
include("header.php"); 
include("sidebar.php");

$memberon = $_GET['user'];
$getmember = mysql_query("SELECT * FROM accounts WHERE username='".$memberon."'");
$member = mysql_fetch_array($getmember);
?>       

    <h2>Edit User</h2> 

<?php
$points = asql($_POST['points']);
$cash = asql($_POST['cash']);
$banned = asql($_POST['banned']);
$completed = asql($_POST['completed']);
$confirm= asql($_POST['confirm']);
$referral= asql($_POST['ref']);
$email= asql($_POST['email']);
$username= asql($_POST['username']);
$fname= asql($_POST['fname']);
$lname= asql($_POST['lname']);
$add= asql($_POST['address']);
$state= asql($_POST['state']);
$country= asql($_POST['country']);
$postal= asql($_POST['postal']);
$apt= asql($_POST['suite']);
$city= asql($_POST['city']);
$phone= asql($_POST['phone']);
$dob= asql($_POST['dob']);


if ($_POST['subm']) {
if($points <> $member['points'] || $cash <> $member['current_b']){
$final_report = "Checking";
print"This users balance has been updated, please input your pass code to confirm these changes <br />
<form method='post' action=''><input type='hidden' name='points' value='$points'><input type='hidden' name='cash' value='$cash'><input type='hidden' name='banned' value='$banned'><input type='hidden' name='confirm' value='$confirm'><input type='hidden' name='ref' value='$referral'><input type='hidden' name='email' value='$email'><input type='hidden' name='fname' value='$fname'><input type='hidden' name='lname' value='$lname'><input type='hidden' name='address' value='$add'><input type='hidden' name='state' value='$state'><input type='hidden' name='country' value='$country'><input type='hidden' name='postal' value='$postal'><input type='hidden' name='suite' value='$apt'><input type='hidden' name='city' value='$city'><input type='hidden' name='phone' value='$phone'><input type='hidden' name='dob' value='$dob'><input type='password' name='passcode' /><input type='submit' name='pcheck' value='Sumbit' /></form>";
}
else
{
$final_report = "";
}
if($final_report == NULL){
$updatemembers = mysql_query("UPDATE accounts SET points='$points', current_b='$cash', level='$banned', email_check='$confirm', referral='$referral', username='$username', fname='$fname', lname='$lname', email='$email', address='$add', state='$state', country='$country', postal='$postal', suite='$apt', city='$city', phone='$phone', dob='$dob' WHERE username='".$memberon."'") or die(mysql_error());
     print "You Have Successfully Updated this Information";    
     header("Refresh: 2;url=edit.php?user=".$memberon."");  
}
}

if($_POST['pcheck']){
$pchecki = asql($_POST['passcode']);
$pchecks = md5($pchecki);
$check = mysql_query("SELECT * FROM panel_access WHERE psn = '".$_SESSION['aname']."'") or die(mysql_error());
$checkar = mysql_fetch_array($check);
$final_report = "Checking.";
if($pchecks != $checkar['change_ab']){
$final_report = "That password is incorrect.";
     print "".$final_report.""; 
     header("Refresh: 2;url=edit.php?user=".$memberon."");
}
else
{
$final_report = "";
}
if($final_report == NULL){
$sqll = "UPDATE accounts SET points='".$points."', current_b='".$cash."', level='".$banned."', email_check='".$confirm."', referral='".$referral."', username='".$username."', fname='".$fname."', lname='".$lname."', email='".$email."', address='".$add."', state='".$state."', country='".$country."', postal='".$postal."', suite='".$apt."', city='".$city."', phone='".$phone."', dob='".$dob."' WHERE username='".$memberon."'";
$updatemember = mysql_query($sqll) or die(mysql_error());
     print "You Have Successfully Updated this Information ".$sqll."";  
     header("Refresh: 2;url=edit.php?user=".$memberon."");  
}
}

    if(!isset($_POST['subm']) && !isset($_POST['pcheck']))
    {
 ?>                   
<div class='form'>
         <form action='' method='post'><input type=hidden name=subm value=1>
                <div class="element">
                        <label for='email'>Email:</label>
                        <input type='text' name='email' id='email' value='<?php echo $member['email'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='username'>Username:</label>
                        <input type='text' name='username' id='username' value='<?php echo $member['username'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='ip'>IP Address:</label>
                        <input type='text' name='ip' id='ip' value='<?php echo $member['ip'] ?>' size='54' readonly='readonly' />
                    </div>
                   <div class="element">
                        <label for='banned'>Banned: <font color='red' size='1'><b>1=No 2=Yes</b></font></label>
                        <input type='text' name='banned' id='banned' value='<?php echo $member['level'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='confirm'>E-Mail Confirmed: <font color='red' size='1'>0=No 1=Yes</font></label>
                        <input type='text' name='confirm' id='confirm' value='<?php echo $member['email_check'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='ref'>Referral:</label>
                        <input type='text' name='ref' id='ref' value='<?php echo $member['referral'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='points'>Points:</label>
                        <input type='text' name='points' id='points' value='<?php echo $member['points'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='cash'>Cash:</label>
                        <input type='text' name='cash' id='cash' value='<?php echo $member['current_b'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='fname'>First Name:</label>
                        <input type='text' name='fname' id='fname' value='<?php echo $member['fname'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='lname'>Last Name:</label>
                        <input type='text' name='lname' id='lname' value='<?php echo $member['lname'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='phone'>Phone:</label>
                        <input type='tel' name='phone' id='phone' value='<?php echo $member['phone'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='dob'>Date of Birth:</label>
                        <input type='text' name='dob' id='dob' value='<?php echo $member['dob'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='address'>Address:</label>
                        <input type='text' name='address' id='address' value='<?php echo $member['address'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='suite'>Suite/Apt.:</label>
                        <input type='text' name='suite' id='suite' value='<?php echo $member['suite'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='country'>Country:</label>
                        <input type='text' name='country' id='country' value='<?php echo $member['country'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='state'>State:</label>
                        <input type='text' name='state' id='state' value='<?php echo $member['state'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='city'>City:</label>
                        <input type='text' name='city' id='city' value='<?php echo $member['city'] ?>' size='54' />
                    </div>
                   <div class="element">
                        <label for='postal'>Postal Code:</label>
                        <input type='text' name='postal' id='postal' value='<?php echo $member['postal'] ?>' size='54' />
                    </div>
<?php
                     print"<dl class='submit'>
                    <input type='submit' name='submit' id='submit' value='Submit' />
                     </dl>





         </form>
         </div> "; 
      }
      include("footer.php");
?>

On a side note I know that mysql_query and the likes are in the process of being deprecated, I want to note that I did not write this, just doing some editing for a client, and this part is happening to be a pain in the rear.

Also its only the query in if($_POST['pcheck']) that isn’t working, the first query for if($_POST['subm'] works fine

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:39:25+00:00Added an answer on June 15, 2026 at 10:39 am

    First, you have an empty string at the end. This doesn’t hurt, but it has no purpose either.

    You redirect the page to edit.php?user=$memberon, but $memberon isn’t set when you get a POST request. You can have either GET or POST, but not both.

    I would guess, you must redirect to

    edit.php?user=$username
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have no idea what this means. But here is the code that it
Anyone have idea on this? Linker errors are way out of my wheelhouse, especially
I have no idea if this question fit to SO, but if it doesn't
I have no idea if this is possible, but if it is, what would
I have no idea why this doesn't work, but doing some validation functions and
I have no idea if this is possible ... but it would be cool.
I have no idea how this works or if it is even possible but
I have no idea why this wont work but I have tried the following:
I have this code for my app, it doesn't show any errors but everytime
This is acting very strange and I don't quite have any idea why. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.