Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as HTML by nicnic22 ( 15 years ago )
<?php

$db = mysql_connect("localhost","root","root"); // husk at fjerne pw på pc
if (!$db)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("nactown", $db);


$navn   =  $_REQUEST["navn"];
$kommentar  =  $_REQUEST["kommentar"];



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


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

mysql_close($db);
?>
<?php header("Location: yoink.php");

 

Revise this Paste

Your Name: Code Language: