I have not had any success so far. Please help me out.
*** PLEASE USE THE
Code: Select all
TAG *****[/color]Code: Select all
<?php
echo ("something!");
$link = mysql_connect("localhost","james","james","testDB") or die(mysqli_connect_error());
if(mysqli_connect_errno())
{
printf("Connection failed: %s\n", mysqli_connect_error());
exit();
}
else
{
$sql = "insert into testtbl(firstName) values('christine')";
$result = mysql_query($link, $sql);
if($result == TRUE)
{
echo "a record has been inserted.";
}
else
{
printf("Could not insert record: %s\n",mysql_error($link));
}
mysql_close($link);
}
?>