Hello.
I've been posting on this subject in the newbie forum, now I'm gonna try my luck here.
I've got apache 2 with php4 and mysql installed on FreeBSD.
I installed everything from the FreeBSD ports-collection and all went well.
Now the problem:
I snagged two scripts from a tutorial, one for displaying what's in a table, and the other one to insert things into a database, it's the latter line that's giving me a headake.
It looks like this
<html>
<head><title>Web Database Sample Inserting</title>
</head>
<body bgcolor=#ffffff>
<?
if (isset($name) && isset($phone)) {
mysql_connect("localhost", "webuser", "");
$query = "INSERT INTO mytable VALUES ($name, $phone)";
$result = mysql_db_query("example", $query);
if (isset($result)) {
echo "<p>$name was added to the database</p>";
}
}
?>
if (isset($result)) {
echo "<p>$name was added to the database</p>";
}
}
?>
The user, doesn't have a password, and it's suppose to be that way (it's just for testing, I'll change it later).
The thing is that the script won't work, I've tried modifying it after the tips I got in the newbie forum, but that didn't really do it.
I can display what's in the database without any problems, it's the inserting bit that doesn't work.
I'm starting to suspect that it's not the script-part that is causing this.
The <host>.err log doesn't say much about this.
I tried inserting som "or die()" in the script, but they didn't give anything.
If someones had a similar problem, please help me with this one.