if statements...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hgmmy
Forum Commoner
Posts: 25
Joined: Sun Aug 26, 2007 9:16 am

if statements...

Post by hgmmy »

Quick question, and here's the example that goes with my question.

Code: Select all

<?php 
include('wp-config.php');//has database connection info in it, and connects to the database.

  $o_theuser = $_POST['theuser'];

  $o_profile = $_POST['profile'];

$update_profile = mysql_query("UPDATE user_allow SET share_info='$o_profile' WHERE ID='{$cur_user_i}' AND reviewers_id='$o_theuser' ");

  if ($o_profile == 'y' || $o_profile == 'n')
 {
  if ($update_profile)
  {
   echo "successful query";
  } else {
 echo "unsuccessful query";
  };
};
?>
That second "if statement" will it return true if the query is successful and false if it isn't successful, and if not what does it take to do that?
Post Reply