(10-09-2009, 10:16 PM)andrewjs18 Wrote: keep getting this error on the send.php file..I copied/pasted your code 2X and it's still giving the same error:
Parse error: syntax error, unexpected ')' in /home/uglycars/public_html/test/php/send.php on line 4
also getting this error on the subscribe.php
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'uglycars_test'@'localhost' (using password: YES) in /home/uglycars/public_html/test/php/subscribe.php on line 24
Connection failed!
Ohhh... man I've posted a wrong syntax, sorry for that.
The first error is here
PHP Code:
if(!isset($_POST['send'])) {
die("Failed to submit your E-Mail!"););
The second error occurs because you didn't define right mysql access variables
PHP Code:
$db = array(
'host' => 'localhost',
'user' => 'root', // input your mysql database username here
'pass' => '', // if you are using a password to access the database the input it here
'base' => 'newsletter' // you should create a new database named newsletter
);
I guess you are having problems with the database, change the "base" to the name of your database and create needed table in it.