Hi,
below code gives me error in line 8.
1. i had paymentform.php
where i entered data.
2. below is paymentinsert.php where i am getting error in line 8.
Fatal error: Function name must be a string in /home/content/59/8390659/html/COUPONDISCOUNTS/php/MySQL/paymentinsert.php on line 8
<?
$username="aaa";
$password="bbb";
$database="aaa";
$amount=$_POST['amount'];
$description=$_POST['description'];
$sender=$_POST['sender'];
$mysql_connect("host",$aaa,$bbb);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO payment VALUES ('$amount','$description','$sender')";
mysql_query($query);
if(1 === mysql_affected_rows()){
echo 'insert passed';
$to = "hhh@email.com";
$subject = "New Cowboy!";
$body = "Your data was inserted into the DB correctly!";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
}
else
echo 'insert failed';
mysql_close();
?>
Pls advise.
Thx.