I’m builing a site, and i have builded a Contact form, but the information in the form won’t send to the database.
I have tested every piece of code only for this I am not sure. That is a code for sending in to the database.
[php]<?php
$connect = mysql_connect(“localhost”,“root”,"****") or die(“FATAL ERROR NUM 1”);
mysql_select_db(“site”) or die(“FATAL ERROR NUM 2”);
$sql=“INSERT INTO contact (name , email, message)
VALUES
(‘ASD’,‘ASD’,‘ASD’)”;
echo"Message Sent!";
?>[/php]
Is there a mistake ?
And i have builded also a register form that works very good.
[php]$sql=“INSERT INTO poruke (ime, email, poruka)
VALUES
(‘ASD’,‘ASD’,‘ASD’)”;
mysql_query($sql);//actually execute the query![/php]
OOPS YEAH i didnt see that i didn’t copy that from register.php