PLEASE CLOSE THIS I HAVE FIGURED OUT THE
------------MY PROBLEM----------------------------------------
mysql_select_db("members") or die(mysql_error());
echo "Database Found!
";
----------------SOLUTION------------------------------------------------------------------
mysql_select_db("a2670376_Pass") or die(mysql_error());
echo "Database Found!
";
Here's my script
<?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! <br>";
mysql_select_db("members") or die(mysql_error());
echo "Database Found! <br>";
$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 "<p>Record Updated<p>";
else
echo "Problem updating record. MySQL Error: " . mysql_error();
?>
<form action="update.php" method="post">
<input type="hidden" name="ID" value="<?=$UID;?>">
IMGNU: <input type="text" name="ud_img" value="<?=$IMGNU;?>"><br>
First Name: <input type="text" name="ud_firstname" value="<?=$firstname?>"><br>
Last Name: <input type="text" name="ud_surname" value="<?=$surname?>"><br>
FB: <input type="text" name="ud_FBID" value="<?=$FBID?>"><br>
<input type="Submit">
</form>
Here's my error MySQL Connection Established! Access denied for user 'a2670376_Users'@'10.1.1.40' to database 'members' I don't know what the 10.1.1.40 is about though I have tried changing it to ("mysql13.000webhost.com", "a2670376_Users", "Password") and still the same thing now this confuses me a lot so I'm 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 haven't made the file update.php yet? i have worked out many bugs in this already but cant seem to get this one out please help me you will be a lifesaver and give me credit for noobish script I'm only 13
I don't need to grant rights because I already 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..
http://fni.site11.com/edit.php is the page I am working on