Gayner Posted August 10, 2009 Share Posted August 10, 2009 if(isset($_POST['avatar'])){ mysql_query("UPDATE ibf_members SET avatar='25' WHERE id={$ibforums->member['id']}"); header("Location: index.php?act=UserCP&CODE=Avatar"); } I have this as my HTML: Avatat url * <input type="text" name="avatar" value=""> <input type="Submit" value="Update Avatar"> How can I update another field name using only 1 mysql_query function too? thx Quote Link to comment Share on other sites More sharing options...
halfman Posted August 10, 2009 Share Posted August 10, 2009 I am not sure what you want to do but I think you should be able to use AND or pass the field name and tablename from another table in your db as variables. Quote Link to comment Share on other sites More sharing options...
Gayner Posted August 10, 2009 Author Share Posted August 10, 2009 I am totally lost, on what u said xD:d Quote Link to comment Share on other sites More sharing options...
halfman Posted August 10, 2009 Share Posted August 10, 2009 my bad, Cant you do this: mysql_query("UPDATE ibf_members SET avatar='25', fieldName2 = 'value' WHERE id={$ibforums->member['id']}"); If not then I am not following your problem and I need a bit more info on that. Quote Link to comment Share on other sites More sharing options...
Gayner Posted August 10, 2009 Author Share Posted August 10, 2009 Sweet, omg awesome, I love mysql now , thanks a bunch sir. Quote Link to comment Share on other sites More sharing options...
halfman Posted August 10, 2009 Share Posted August 10, 2009 Sweet, omg awesome, I love mysql now , thanks a bunch sir. No worries mate Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.