Well first of all one reason I think there might be a problem is the fact that I have the MySQL activated on another account and not this one. (This is for a school project so MySQL will be used on this site for only 1 week, I know that this 110mb doesn't want this, please make exception.) I'm making a quiz for students to enter in their names and then have that submitted to a table as well as their grade afterwards. I'm just beginning to test out parts of it which aren't working.
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'database username'@'localhost' (using password: YES) in /www/110mb.com/b/i/o/q/u/i/z/_/bioquiz/htdocs/insert.php on line 2
Could not connect: Access denied for user 'database username'@'localhost' (using password: YES)
So here is what is on insert:
<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("table", $con);
$sql="INSERT INTO person (FirstName, LastName, Age)
VALUES
('$_POST[firstname]','$_POST[lastname]','$_POST[grade]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
Some information such as usernames and passwords not provided in code, I have taken those out for the forums. I'm quite sure they are created because I did make it on the 110dbmanager and I believe all the information is right. Could this just be happening because of some security thing on 110mb so that I can't use that mysql?