Her kommer min php og html kode :)
insert.php:
<html>
<head>
<!-- Siden skal gaa tilbage til blog.php paa nul sekunder -->
<meta http-equiv="refresh" content="0; url=index.html" />
<title>Klaudia</title>
</head>
<body>
<?php
$DBhost = "localhost";
$DBuser = "besked";
$DBpass = "sebeskeder";
$DBname = "beskeder";
$table = "besked";
// Opretter forbindelse til databasen
mysql_connect($DBhost, $DBuser, $DBpass) or die ("Ingen forbindelse");
@mysql_select_db("beskeder") or die ("Fandt ikke DB");
// variabler der henviser til tabel besked
$navn = $_GET['navn'];
$email = $_GET['email'];
$sendbesked = $_GET['sendbesked'];
// Saetter data ind i databasen
$sqlquery = "INSERT INTO ". $table ." (navn, email, sendbesked) VALUES (' " .$navn. "', ' ".$email."', '".$sendbesked."')";
$results = mysql_query("$sqlquery");
mysql_close();
?>
</body>
</html>
kontakt.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<link rel="stylesheet" href="styles.css" type="text/css" />
<title></title>
</head>
<body>
<div id="container"> <!-- Container start -->
<div id="header">
<h1></h1>
<ul id="nav">
<li><a href="Kontakt.html">Kontakt</a></li>
<li><a href="Profil.html">Profil</a></li>
<li><a href="Nyheder.html">Nyheder</a></li>
<li><a href="index.html">Forside</a></li>
</ul>
</div>
<hr width="90%" align="center" color="#cccccc" size="small"> </hr>
<div id="content2"> <!-- Content start -->
</p>
<p>Hvis du har nogle spørgsmål, er du velkommen til at kontakte mig. </p>
<form id="form" method="get" action="insert.php">
<label>Navn: *</label>
<br>
<input type="text" value="" name="navn">
</p>
<label>Email: *</label>
<br>
<input type="text" value="" name="email">
</p>
<label>Besked: *</label>
<br>
<textarea width="1%" rows="20" cols="50%" name="sendbesked"></textarea>
</p>
<input type="submit" value="Send">
</form>
</div>
<hr width="90%" align="center" color="#cccccc" size="small"> </hr>
<div id="footeren">
<p><small>