Note that there are some explanatory texts on larger screens.

plurals
  1. POWhats wrong with this PHP/MySQL script? It Will Not Work Properly
    text
    copied!<p>PLEASE CLOSE THIS I HAVE FIGURED OUT THE ------------MY PROBLEM---------------------------------------- mysql_select_db("members") or die(mysql_error()); echo "Database Found! <br>";</p> <p>----------------SOLUTION------------------------------------------------------------------</p> <p>mysql_select_db("a2670376_Pass") or die(mysql_error()); echo "Database Found! <br>";</p> <hr> <p>heres my script</p> <pre><code> &lt;?php $ud_ID = $_REQUEST["ID"]; $ud_firstname = $_POST["ud_firstname"]; $ud_surname = $_POST["ud_surname"]; $ud_FBID = $_POST["ud_FBID"]; $ud_IMG = $_POST["ud_IMG"]; mysql_connect('mysql13.000webhost.com'… 'a2670376_Users', 'Password') or die(mysql_error()); echo "MySQL Connection Established! &lt;br&gt;"; mysql_select_db("members") or die(mysql_error()); echo "Database Found! &lt;br&gt;"; $query = "UPDATE stokesley_members SET firstname = '$ud_firstname', surname = '$ud_surname', FBID = '$ud_FBID' WHERE ID = '$ud_ID'"; $res = mysql_query($query); if ($res) echo "&lt;p&gt;Record Updated&lt;p&gt;"; else echo "Problem updating record. MySQL Error: " . mysql_error(); ?&gt; &lt;form action="update.php" method="post"&gt; &lt;input type="hidden" name="ID" value="&lt;?=$UID;?&gt;"&gt; IMGNU: &lt;input type="text" name="ud_img" value="&lt;?=$IMGNU;?&gt;"&gt;&lt;br&gt; First Name: &lt;input type="text" name="ud_firstname" value="&lt;?=$firstname?&gt;"&gt;&lt;br&gt; Last Name: &lt;input type="text" name="ud_surname" value="&lt;?=$surname?&gt;"&gt;&lt;br&gt; FB: &lt;input type="text" name="ud_FBID" value="&lt;?=$FBID?&gt;"&gt;&lt;br&gt; &lt;input type="Submit"&gt; &lt;/form&gt; </code></pre> <p>heres my error MySQL Connection Established! Access denied for user 'a2670376_Users'@'10.1.1.40' to database 'members' i dont know what the 10.1.1.40 is about tho i have tryed changing it to ("mysql13.000webhost.com", "a2670376_Users", "Password") and still the same thing now this confuses me alot so im not even sure there is an error but i think there is cause if there was no error the script would show could this error be caused because i havent made the file update.php yet? i have worked out many bugs in this alredy but cant seem to get this one out please help me you will be a lifesaver and give me credit for noobish script im only 13</p> <p>i dont need to grant rights because i alredy have rights i have a file named connect.php it connects the register and login scripts that i have that works fine but this wont..</p> <p><a href="http://fni.site11.com/edit.php" rel="nofollow">http://fni.site11.com/edit.php</a> is the page i am working on </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload