Ohh, I see,
now I see the mistake:
$last_id = ("SELECT id FROM jokes LAST_INSERT_ID");
$id = ($last_id + '1');
$sqladd = ("INSERT INTO jokes VALUES ($id, $title, $joke, $language, $date, $author)");
$result = mysql_query($sqladd);
dbase_add_record ($sqladd);
the row:
$last_id = ("SELECT id FROM jokes LAST_INSERT_ID");
does nothing with DB, you have and $last_id variable which contains a string "SELECT id FROM jokes LAST_INSERT_ID".
But it is not executed anywhere, and each SQL statement must be executed. And it should be probaly SQL statement which returns the maximal inserted ID. It should look like:
SELECT max(id) FROM jokes;
then
$sql = "SELECT max(id) as last_id FROM jokes";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
then
$row["last_id"] should contain the maximum id from table named jokes
But as I mentioned before you can use an AUTO_INCREMENT. In this case you do not insert into this column and MySQL will do that automatically.
It is not so easy ;-)
Zdenek