Kipkip
Join the Revolution
- 967
- Posts
- 21
- Years
- Age 34
- Seen Jun 24, 2007
Ok, I'm making a tagboard for my first PHP/MySQL script and I think I have something wrong with the input query since nothing shows up in the table. Can anyone help? Here's the code:
I don't see any error in it or my dbinfo page. Can someone please help? And if you know how to use a file for the database instead of a MySQL database, can you please help me on that too? Thanks.
Also, if you need it, here's what's in the table:
Name Type Length Extra
id INT 6 PRIMARY auto_increment
website VARCHAR 15
email VARCHAR 15
message VARCHAR 50
PHP:
<?php
include("dbinfo.php");
$name=$_POST['name'];
$website=$_POST['website'];
$email=$_POST['email'];
$message=$_POST['message'];
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO tagboard VALUES ('','$name,'$website','$email','$message')";
mysql_query($query);
mysql_close();
?>
Also, if you need it, here's what's in the table:
Name Type Length Extra
id INT 6 PRIMARY auto_increment
website VARCHAR 15
email VARCHAR 15
message VARCHAR 50
Last edited: