Tco03 0 Newbie Poster

Allright so.. Im kinda stuck with the project im working on.
Im allmost done with it but the remaining is to show each row in a form.
I got a form i fill out that save the data to my database, i got a script that shows all my information like this

ID:   Navn:      TLF:         Backup:      Kommentar:         Endre:     Bilde:
51    John     987541236       Nei         Virus etc.         [LINK]     [LINK]
51    Kate     987541236       Ja          Reinstall.         [LINK]     [LINK]
51    Lisa     987541236       Nei         Bluescreen.        [LINK]     [LINK]
51    Lars     987541236       Ja          HW problem.        [LINK]     [LINK]

I would love if someone could show/make a script like when i press on the ID number i get the form up like it was when i filled it out and submited it to the database.

Im from norway so the tables means:NAVN=NAME TLF=PHONENR KOMMENTAR=COMMENT ENDRE=CHANGE

Here is my form script:

<style type="text/css">
<!--
.a {
    text-align: center;
}
-->
</style>
<img src="bilde/header.jpg" alt="" width="705" height="207"></img>

<form action="form_send.php" method="post" />
<p>Navn: 
  <input type="tekst" name="Navn" /></p>
<p>TLF:
  <input type="tekst" name="TLF" />
</p>
<p>Backup: 

  <input type="tekst" name="Backup" />
</p>
<p>Lader: 
  <input type="tekst" name="Lader" />
</p>
<p>
  <textarea rows="20" cols="43" name="Kommentar"></textarea>
</p>
<input type="submit" value="Send inn" />
  </form>

Here is the form_send file that sends the information to the database:

<style type="text/css">
<!--
.a {
    text-align: center;
}
body {
    background-image: url(bilde/bakgrund.png);
}
-->
</style>
Din ordre er registert!</img>
<meta http-equiv="refresh" content="2;url=http://localhost/reperasjon/get.php/" />
<?php


define('DB_NAME', 'reperasjon');
define('DB_USER', 'XXX');
define('DB_PASSWORD', 'XXX');
define('DB_HOST', 'localhost');

$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

if (!$link) {
    die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db(DB_NAME, $link);

if (!$db_selected) {
    die('Can\'t use ' . DB_NAME . ': ' . mysql_error());
}

$value = $_POST['Navn'];
$value2 = $_POST['TLF'];
$value3 = $_POST['Backup'];
$value4 = $_POST['Kommentar'];

$sql = "INSERT INTO form (Navn, TLF, Backup, Kommentar) VALUES ('$value', '$value2', '$value3', '$value4')";

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

mysql_close();
?>

Hoping for some answers :D
PS: sorry for the bad english

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.