title: How do I update a row in MySQL using php?
body: <p>How do I update the row $pageviews by +1 each time someone visits my page. The table name is news and the row to be updated is $pageviews whose default value is +1. Should I use the update function? And how do I implement it? Below is my code. Can you show a demonstration using these data?        </p>
  
  <pre><code>$data = mysql_query("SELECT * FROM news") or die(mysql_error()); 
  while($info = mysql_fetch_array( $data )) 
  {  
      $id = $info['id'];
      $pageviews = $info['pageviews'];
  }
  </code></pre>