When I Type An Age And Click On Update...It Doesn't Update In My Database! It's The SQL Query's Problem!
Please Help!
Thanks!
<?php include_once 'config.php' ; if (!isset($_SESSION['user_id'])&& empty ($_SESSION['user_id'])) { echo 'You must be logged in to edit your profile.'; die () ; } else { if (isset ($_POST['submit'])) { $age = $_POST ['age'] ; if (!empty ($age)) { $sql = "INSERT INTO `users` VALUES('','','','','','','','$age','','','')" ; //I WANT THE CHANGES SHOULD BE SAVED ONLY FOR THE USER WHO IS CURRENTLY LOGGED IN! if ($sql_run = mysql_query ($sql)) { die ('Your profile has been updated.') ; } else { die ('There Was A problem Updating Profile.') ; } } else { echo 'Please Fill In Fields.' ; } } } ?> <form action="edit_profile.php" method="POST"> Age : <input type="text" name="age"><br><br> <input type="submit" name="submit" value="Update!"> </form>