Anyone can view the error in this code because the code is returning only to me:
The name does not exist
It was all working well now it is not.
If someone can spot it and make me right because I am still new to this.
& lt ;? Php // See if the form has been completed ("php_includes / check_login_status.php"); Include_once ("php_includes / db_conx.php"); // Start any variable, which page $ username = ""; $ Firstname = ""; $ Nickname = ""; $ Gender = "male"; $ Country = ""; $ Weight = ""; $ Height = ""; If (isset ($ _GET ["u"])) {$ username = preg_replace ('# [^ a-z0-9] #i', '', $ _GET ['u']); } $ Sql = "SELECT * user WHERE user name = '$ user name' and active = '1' LIMIT 1"; $ User_query = mysqli_query ($ db_conx, $ sql); // Check that the user is present in the database ($ row = mysqli_fetch_array ($ user_query, MYSQLI_ASSOC)) {$ username = $ row ["username"]; $ First name = $ line ["first name"]; $ Nickname = $ line ["nickname"]; $ Weight = $ line ["weight"]; $ Height = $ line ["height"]; $ Email = $ line ["email"]; $ Gender = $ line ["gender"]; } If (isset ($ _ POST ['submit'])) {$ username = $ _POST ['username']; $ First name = $ _POST ['first name']; $ Nickname = $ _POST ['nickname']; $ Weight = $ _POST ['weight']; $ Height = $ _POST ['height']; $ Email = $ _POST ['email']; $ Gender = $ _POST ['gender']; Mysql_connect ("host", "****", "*****"); Mysql_select_db ('db_k1003140'); // Check that the user exists $ exists = mysql_query ("Select * from where the user names first = '" .US Username. "" ") Or die (" Can not connect query "); if (mysql_num_rows ($ Exists)! = 0) {// "update details" in database mysql_query (utidad user set firstname = '$ firstname', alias = '$ surname', weight = '$ weight', height = '$ height 'WHERE username =' $ username '"") or die ("update can not be applied"); dumb "successful";} Second resonance "name does not exist";}? & Gt;
Here's HTML:
DOCTYPE html> gt; meta charset = "UTF-8"> gt; title & gt; profile Update: & lt ;? php echo $ u?? & Gt; link rel = "icon" href = "favicon.ico" type = "image / x-icon" & gt; ; & Lt; link rel = "stylesheet" type = "text / css" href = "style.css">
Comments
Post a Comment