[b]Hi there I have a problem with a function( i think is the function) don't pay attention to the noob code everything works except last part I'M NOT ABLE TO WRITE DATBASE (connected succesfully)[/b] this is nothing real is homework but I been stuck in this part for 3 days, thanks for your help look at the last lines in bold that's what i think is wrong. <?php require_once ('db_connect.php'); if (isset ($_POST[submit])){ if (strlen ($_POST[name])>0) {$name = stripslashes ($_POST[name]);} else {$name = NULL; echo '<p><b>Your forgot to enter your name!!</b></p>' ;} if (strlen ($_POST[email])>0) {$email = stripslashes ($_POST[email]);} else {$email = NULL; echo '<p><b>Your forgot to enter eMail!!</b></p>' ;} if(strlen ($_POST[new_bid])>0) {$new_bid =($_POST[new_bid]);} else {$new_bid = NULL; echo '<p><b> Please place your bid!</b></p>';} if (($_POST[name]) && ($_POST[email] )&& ($_POST[new_bid])) ; { echo "Thank you, <b>{$_POST[name]}</b> for bidding, we'll contact you at <b>{$_POST[email]}</b> if you win this item";} } else{ //displays form ?> <title>PLE1</title> <body bgcolor="#CCCCCC"><form action=" <?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <fieldset style="border-color:#1A50B8 "><legend><font color="#1A50B8">Enter your information</font></legend> <p><b>Your name:</b> <input type="text" name="name" maxlength="40"></p> <p><b>Email:</b> <input type="text" name="email" maxlength="25"></p> <b>Your Bid:</b> <select name = "new_bid"> <option value="">Increase By</option> <option value="10">US$10</option> <option value="20">US$20</option> <option value="30">US$30</option> <option value="40">US$40</option> <option value="50">US$50 </option> </select> <input type="submit" value="PlaceBid" name="submit"> </fieldset /form> <?php } ?> <table cellpadding="2" cellspacing="1" border="2" bordercolor="#000000"> <tr> <td bgcolor="666666"<b>Image</b></td> <td bgcolor="666666"<b>Description</b></td> <td bgcolor="666666"<b>Current Bid</b></td> <td bgcolor="666666"<b>Highest Bidder</b></td> <td bgcolor="666666"<b>Select</b></td> </tr> <?php $sql = 'select * from plepictures order by bid desc'; $result = @mysql_query($sql); while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)) { echo '<tr><td><img src = "'. $row['filename']. '"></td>' //file name working . '<td bgcolor="cccccc">'. $row['description'].'</td>' // description working . '<td bgcolor="999999">US$'. $row['bid'].'</td>' //bid working . '<td bgcolor="666666">'. $row['name'].'</td>' //name working .'<td align = "center" bgcolor="000000"><input type = "radio" name = "image_id" value = '. $row['id'].'"></td></tr>'; } ?> </table> [b] <?php //EVERYTHING UP TO HERE WORKS FINE DATABASE IS CONNECTED ETC. //THIS IS THE FUNCTION THAT's PROBABLY IS WRONG function increaseBid() { $sql = "select bidfrom plepictures WHERE id=$image_id"; $result = @mysql_query($sql); $row = @mysql_fetch_array($result,MYSQL_ASSOC); $bid = $row[0] + $new_bid; mysql_query("UPDATE plepictures SET bid='$bid', name='$name', email='$email', WHERE id='$image_id'"); } function getYear() { $year = date("Y"); return $year; } if (isset ($_POST[submit])){ increaseBid();//<======================CALLED THE FUCTION printf ( mysql_affected_rows()); print("This year is: ".getYear()."\n"); ALL THIS IS SUPPOSED TO WORK BUT IT JUST WON'T CHANGE ANY VALUES IN MY PAGE [/b] } ?> NOW IF I CHANGE A VALUE IN THE DATABASE IS SHOWN IN THE PAGE, BUT I CAN'T MAKE IT WRITE THE DATABASE AND RETURN THE VALUES TO MY PAGE.