Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (17 sloc) 463 Bytes
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("openspace", $con);
$sql="INSERT INTO my_messages (my_id,contact_id,date_time_of_mesg,msg_text)
VALUES
('$_POST[my_id]','$_POST[contact_id]','$_POST[date_time_of_mesg]','$_POST[msg_text]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>