title: php - Editing a profile page of a user
body: <p>I'm currently trying to make a profile editing page. I'm using php and MySQL for the database. I don't know much about php and MySQL. My question is: When I press submit I get a blank page. It doesn't print out the error or the success. Any thoughts on how to solve it? Here is my php code:</p>
  
  <pre><code>&lt;?php
    session_start();
    include_once 'dbconfig.php';
    if(!isset($_SESSION['user'])) {
      $userRow=mysql_fetch_array($res);
      $username= $userRow["user_name"];
      $useremail= $userRow["user_email"];
      $userabout= $userRow["user_about"];
  
      $results = $mysqli-&gt;query("UPDATE users SET user_name='$username', user_email='$useremail', user_about='username' WHERE user_id=user");    
  
      if($results){
        print 'Success! record updated'; 
      } else {
        print 'Error : ('. $mysqli-&gt;errno .') '. $mysqli-&gt;error;
      }
    }
  ?&gt;
  </code></pre>
  
  <p>And my Form code for updating the information of the user:</p>
  
  <pre><code>&lt;?php
    session_start();
    include_once 'dbconfig.php';
  
    if(!isset($_SESSION['user'])) {
      header("Location: index.php");
    }
    $res=mysql_query("SELECT * FROM users WHERE user_id=".$_SESSION['user']);
    $userRow=mysql_fetch_array($res);
  ?&gt;
  
  &lt;div class="main"&gt;
    &lt;form action="change.php" method="post"&gt;
      &lt;div&gt;
        &lt;label for="uname"&gt;&lt;a&gt;User Name:&lt;/a&gt;&lt;/label&gt;
        &lt;input type="text" name="username"  value="&lt;?php echo $userRow['user_name'];?&gt;"/&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
        &lt;label for="email"&gt;&lt;a&gt;Email:&lt;/a&gt;&lt;/label&gt;
        &lt;input type="text" name="useremail"  value="&lt;?php  echo $userRow['user_email'];?&gt;"/&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
        &lt;label for="about"&gt;&lt;a&gt;About me:&lt;/a&gt;&lt;/label&gt;
        &lt;textarea name="userabout" rows="10" cols="30" value="&lt;?php echo $userRow['user_about'];?&gt;"/&gt;&lt;/textarea&gt;
      &lt;/div&gt;
  
      &lt;input type="submit"  value="Submit"&gt;
  
    &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>