Foser Posted July 6, 2007 Share Posted July 6, 2007 Alright, I want a page where the administrator has rights to edit the user data by msql_query("UPDATE..."); I know how to do this no problem Because some fields are drop down menus or fields and most of the old data is entered taking the info from the SQL database. How can I make it so if you only change the username so it won't change the password and the email and so on. Quote Link to comment Share on other sites More sharing options...
jscix Posted July 6, 2007 Share Posted July 6, 2007 UPDATE "table_name" SET column_1 = [value1], column_2 = [value2] WHERE {condition} Quote Link to comment Share on other sites More sharing options...
Foser Posted July 6, 2007 Author Share Posted July 6, 2007 so if i do it this way it will change it all but if everything is inserted in the html from the database and it dosint changte this can work. Although how can I make a default value of a drop down menu with php or a default, a default check on the group radio button? (using php ofcourse thanks Quote Link to comment Share on other sites More sharing options...
jscix Posted July 6, 2007 Share Posted July 6, 2007 do you mean auto-select a value in a drop down list-box? the html is: selected="list-item" I'm not positive with radio buttons.. you should be able to look that up on google easily though. Quote Link to comment Share on other sites More sharing options...
Foser Posted July 6, 2007 Author Share Posted July 6, 2007 well the way you showedd me of updating the data is correct. although all values must be taken from the database an inserted as an innitial value if you only edit a username the rest will want to stay the same. how to make an initial value with php with drop down menus or radio groups? 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.