Yeah thanks mate, that's sorted the problem, I knew I would have to do that, but I tried it a few different ways and I couldn't do it lol... Just one of those things I guess  Thanks anyway
Don't suppose you could help with this though could you?
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/xingeh/public_html/test/insert.php on line 32
PHP Code:
<?
include("tags.php");
$tname = $_GET['tname'];
$ttype = $_GET['ttype'];
$caption = $_GET['caption'];
$tutorial = $_GET['tutorial'];
$author = $_GET['author'];
if(!$tname) {
exit("You need to input a title for the tutorial");
}
if(!$ttype) {
exit("You need to input a type of tutorial");
}
if(!$caption) {
exit("You need to input a caption");
}
if(!$author) {
exit("You need to input an author for the tutorial!");
} else {
$tname = addslashes($tname);
$caption = addslashes($caption);
$tutorial = addslashes($tutorial);
$tutorial = tags($tutorial);
mysql_connect("localhost", "lalala", "lalalala") or die("Could not connect to DB because: ".mysql_error());
mysql_select_db("lalala") or die("Could not select the DB because: ".mysql_error());
$query = "INSERT INTO tutorials VALUES ('', '".$tname."', '".$ttype."', '".$caption"', '".$tutorial."', '".$author."')";
mysql_query($query) or die("Could not complete query because: ".mysql_error());
?>
|