CREATE TABLE shoutbox (
id int(11) NOT NULL auto_increment,
name text NOT NULL,
message longtext NOT NULL,
time text NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
<?
mysql_pconnect("216.131.80.197","babesoncams","bastui8939");
mysql_select_db("news");
if($submit)
{
$time=date("h:ia d/j/y");
$result=MYSQL_QUERY("INSERT INTO shoutbox (id,name,message,time)"."VALUES ('NULL','$name', '$message','$time')");
}
?>
<?
$result = mysql_query("select * from shoutbox order by id desc limit 5");
while($r=mysql_fetch_array($result))
{
$time=$r["time"];
$id=$r["id"];
$message=$r["message"];
$name=$r["name"];
?>
<? echo $time ?><br>
<? echo $name ?><br>
<? echo $message ?><br><br>
<? } ?>
<form action="<? echo $php_self ?>" method="post">
<INPUT TYPE='TEXT' value='name' NAME='name' SIZE=30 maxlength='100'><br>
<INPUT TYPE='TEXT' value='message' NAME='message' SIZE=30 maxlength='100'>
<input type="submit" name="submit" value="submit">
</form>
and when i go to ie it says
CREATE TABLE shoutbox ( id int(11) NOT NULL auto_increment, name text NOT NULL, message longtext NOT NULL, time text NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM;
Warning: Access denied for user: 'babesoncams@216.131.80.197' (Using password: YES) in /home/httpd/babesoncams.com/html/shoutbox.php on line 10
Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/httpd/babesoncams.com/html/shoutbox.php on line 11
Warning: MySQL: A link to the server could not be established in /home/httpd/babesoncams.com/html/shoutbox.php on line 11
Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/httpd/babesoncams.com/html/shoutbox.php on line 20
Warning: MySQL: A link to the server could not be established in /home/httpd/babesoncams.com/html/shoutbox.php on line 20
Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/babesoncams.com/html/shoutbox.php on line 21