hi there.
new install of php5, mysql5, apache 2 running on ubuntu 10.04.
this won't enter anything into my db.
there are 3 fields in the db. name, number and status. number is auto increment.
i don't get any errors nor does the "thanks for posting" text show up. no records are in the db.
i've fooled around with this too much and i think there may be a problem with my mysql/php install.
any suggestions?
new install of php5, mysql5, apache 2 running on ubuntu 10.04.
this won't enter anything into my db.
Code:
<?php $name=$_POST[name]; $user="user"; $password="password"; $database="test"; mysql_connect(localhost, $user, $password) or die(mysql_error("Unable to connect to database")); mysql_select_db($database) or die(mysql_error("Unable to select database")); $query= INSERT INTO test(name, status) VALUES ('_$POST[name]', 0); mysql_query($query); mysql_close(); echo "thanks for posting." ?>
there are 3 fields in the db. name, number and status. number is auto increment.
i don't get any errors nor does the "thanks for posting" text show up. no records are in the db.
i've fooled around with this too much and i think there may be a problem with my mysql/php install.
any suggestions?