eleven0 Posted March 9, 2008 Share Posted March 9, 2008 $i=$_POST['id'] include 'config2.php'; include 'opendb.php'; $query = "UPDATE members SET tag='$t', name='$n', lastname='$ln', rank='$r', pos='$p', squad='$sq', asn='$as', tour='$tr'"; $result = mysql_query($query) or die(mysql_error()); echo "Changed"; How do i edit this code so it will only update the member with that "id" number instead of everyone in members table. Link to comment https://forums.phpfreaks.com/topic/95254-update-query-help/ Share on other sites More sharing options...
trq Posted March 9, 2008 Share Posted March 9, 2008 $query = "UPDATE members SET tag='$t', name='$n', lastname='$ln', rank='$r', pos='$p', squad='$sq', asn='$as', tour='$tr' WHERE id = $i"; Link to comment https://forums.phpfreaks.com/topic/95254-update-query-help/#findComment-487900 Share on other sites More sharing options...
eleven0 Posted March 10, 2008 Author Share Posted March 10, 2008 Thanks thorpe. Link to comment https://forums.phpfreaks.com/topic/95254-update-query-help/#findComment-488200 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.