![]() |
#1 |
Registered User
Join Date: Aug 2016
Posts: 4
|
Database update query
HI.
Just a quick question. I've created a form which has a drop down menu, and named the drop down menu, profile_country. I've set the form up so that when I receives the correct entry from the database, it displays the data in the form. All I like to ask is if a selection is chosen from the drop down, (ie from uk to usa for example), how do I update the database as I can't get it to work. I'd just like to ask if the correct syntax is used after sql, and after the update, do I use query or something else to complete the update? $user_country = $_POST["profile_country"]; //Get the data from the form $userID = $_POST["profile_ID"]; //Get the data from the form $sql = "UPDATE phpbear_registration SET Country='$user_country' WHERE Member_id='$userID'"; //mysqli_select_db($db_databasename); // Try this line mysqli_query($conn,$sql); mysqli_close($conn); Thank You. -------------------------------------------------------------------------- Relax more: sms ringtone download, zedge ringtones, best ringtone download Last edited by alexwaston; 12-02-2016 at 08:11 PM.. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SEO Update | minddigital | 9 | 06-22-2020 11:36 AM | |
0 Drop Magento Database in One Query | sansastark | Programming General | 0 | 07-11-2016 06:26 PM |
Windows Hosting on IIS 8 Server with Free SQL 2012 Database | thewebhosting | Web Promotion | 1 | 04-04-2013 08:53 AM |
Plastic Surgeons Database of United States (Phone, Address, Zip) | immediate | Post your ad here | 0 | 05-09-2012 12:11 AM |
ISO Country Codes and Area Codes Database with Population, Area and GDP | immediate | Post your ad here | 0 | 02-03-2012 03:48 AM |