Hi im sorta new to programming, and i dont know any object oriented php yet.
I was having some trouble with this dynamic form script i am trying to make. The dynamic form works fine, but i want to have an edit button right next to each dynamic table entry, which is the troublemaker here.
[php]
<?php include("db.php"); $title=$_POST["title"]; $text=$_POST["text"]; $sqlInsert="INSERT INTO kontrakt VALUES ('$title', '$text');"; $sqlSave=mysql_query($sqlInsert); $sqlSentence="SELECT * FROM kontrakt;"; $sqlResult=mysql_query($sqlSentence) or die ("ikke mulig å lagre"); $numRows=mysql_num_rows($sqlResult); if ($numRows==0) { print("ingen kontrakt er laget"); } else { ?>
<table border="1px">
<form method="post" action="" name="points" id="points">
<?php
for ($r=1;$r<=$numRows;$r++)
{
$row=mysql_fetch_array($sqlResult);
print("
}
}
?>
[/php]Some of the names and id’s are in norwegian, but i’ve tried to keep all variable names in english.
All help is much appriciated