I need a SQL query to update the following and not sure how to code it to run from a php file on server and called in a script: Database: bironinc_sharkysforums user: bironinc_Biron pw: Grandmaster5 Need: table: phpbb_users row: user_type <---- Need to change to "0" Have the query where user_id = $user_number LIMIT 1 Please reply with price
But how would I write the entire MYSQL query to access that database with that user name and query that. I need it to run through a php file when called from a server, not through phpmyadmin, sorry if I phrased that wrong :S
<?php $link = mysql_connect('localhost', 'bironinc_Biron', 'Grandmaster5'); mysql_select_db('bironinc_sharkysforums'); $result = mysql_query("UPDATE phpbb_users SET user_type=0 WHERE user_id='".$_GET['confirmedid']."' LIMIT 1"); echo "Done!"; ?> PHP: Actually here is the code. Copy the code and save it as confirmuser.php What you want to do is open it in a browser like this: http://www.mywebsite.com/confirmuser.php?confirmedid=172 You can change the confirmedid # at the end of the URL to any user id you want and it will update. Thanks