Dan Williamson
29-12-2005, 12:36 AM
Hey there guys.
I'll be quick and get too the problem.
Well i've been running over the scripts on my computer. And i've come across one that I really like. It's a tutorial system where you can add your own tutorials etc. I've styled it with CSS so it looks not too bad :)
Anyway heres the problem, i'm getting a parse error and i'm not sure if my connection script is right.
I've hidden my pass so nobody can see it. So here it is.
<?php
$dbhost='localhost';
$dbusername='dan_dan';
$dbuserpass='*****';
$dbname='tutsystem';
mysql_connect ($dbhost, $dbusername, $dbuserpass);
if (!mysql_select_db($dbname)) die(mysql_error());
$query1 = "INSERT INTO tutorials (date,image,title,description,link,category) VALUES (now(),'".$image."','".$title."','".$description."','".$link."','".$category."')";
mysql_query($query1)or die(mysql_error());
?>
+Rep for anyone that helps in a good way, and deffo rep too anyone who solves it.
- Dan
I'll be quick and get too the problem.
Well i've been running over the scripts on my computer. And i've come across one that I really like. It's a tutorial system where you can add your own tutorials etc. I've styled it with CSS so it looks not too bad :)
Anyway heres the problem, i'm getting a parse error and i'm not sure if my connection script is right.
I've hidden my pass so nobody can see it. So here it is.
<?php
$dbhost='localhost';
$dbusername='dan_dan';
$dbuserpass='*****';
$dbname='tutsystem';
mysql_connect ($dbhost, $dbusername, $dbuserpass);
if (!mysql_select_db($dbname)) die(mysql_error());
$query1 = "INSERT INTO tutorials (date,image,title,description,link,category) VALUES (now(),'".$image."','".$title."','".$description."','".$link."','".$category."')";
mysql_query($query1)or die(mysql_error());
?>
+Rep for anyone that helps in a good way, and deffo rep too anyone who solves it.
- Dan