Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as HTML by nicnic ( 16 years ago )
<body>
<?php

$db = mysql_connect("localhost","root","");
if (!$db)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("nactown", $db);

$navn = $_POST['navn'];
$kommentar = $_POST['kommentar'];

$sql="INSERT INTO kommentarer (navn, kommentar) VALUES ('$navn' '$kommentar')";


if (!mysql_query($sql,$db))
  {
  die('Error: ' . mysql_error());
  }

mysql_close($db)
?>
<a href="yoink.php">Ty, click me to get back !</a>
</body>

 

Revise this Paste

Your Name: Code Language: