homer.favenir Posted September 8, 2007 Share Posted September 8, 2007 this is my html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form action="create_table.php" method="post" target="_top"> First Name: <input type="text" name="FirstName" /> Last Name: <input type="text" name="LastName" /> Age: <input type="text" name="Age" size="5" /> <br><br> <input type="submit" /> </form> </body> </html> it will make a form to submit a data to php and here is my php script <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $con = mysql_connect("192.168.4.176","homer.favenir","homerfavenir"); if (!$con) { die ('could not connect: ' . mysql_error()); } if (mysql_query("create database my_db",$con)) { echo "Database Created"; } else { echo "error handling filename:" . mysql_error(); } mysql_select_db ("my_db", $con); $sql=("create table person ( PersonID int not null auto increment, FirstName varchar (15), LastName varchar (15), Age int) "); mysql_query ($sql, $con); $entry_data = "insert into person ( fistname, lastname, age ) values('$_POST[FirstName]','$_POST[LastName]','$_POST[Age]')"; if (!mysql_query ($entry_data, $con)) { die ('Error :'. mysql_error()); } echo "1 record added"; mysql_close($con); ?> </body> </html> but there is an error: Warning: mysql_connect() [function.mysql-connect]: Host 'AAI-AGS-139DW.AAIGLOBAL.local' is not allowed to connect to this MySQL server in C:\wamp\www\first project\create_table.php on line 10 could not connect: Host 'AAI-AGS-139DW.AAIGLOBAL.local' is not allowed to connect to this MySQL server what does this means? how can i solve this? thanks :'( ??? Link to comment https://forums.phpfreaks.com/topic/68509-i-cant-connect-to-the-server-what-seems-to-be-the-problem-pls-help-tnx/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.