Nykomling
|
|
Reg.datum: Dec 2004
Inlägg: 23
|
|
Nykomling
Reg.datum: Dec 2004
Inlägg: 23
|
Ah ursäkta.
Så här ser koden ut.
<?
$uni = addslashes($uni);
$program = addslashes($program);
$term = addslashes($term);
$course = addslashes($course);
$title = addslashes($title);
$author1 = addslashes($author1);
$author2 = addslashes($author2);
$author3 = addslashes($author3);
$author4 = addslashes($author4);
$edition = addslashes($edition);
$year = addslashes($year);
$publisher = addslashes($publisher);
$isbn = addslashes($isbn);
$status = addslashes($status);
$db=mysql_connect("localhost", "uppsalamedicin_", "vitpiller");
mysql_select_db("uppsalamedicin_", $db);
if (!$db)
{
echo "Error Kunde inte kontakta databasen försök igen senare.";
exit;
}
mysql_query("INSERT INTO tblbooks (year, publisher, isbn, status) VALUES ('$year', '$publisher', '$isbn', '$status')");
$result = mysql_query($query);
if ($result)
echo mysql_affected_rows()." bok lagrad i databasen.";
?>
|