On second time I want ask little help from who of you who will want to help me, and I will very tankful for this.
I am new in php programing and mysql, for this sorry if the my way is not right!
Now on the problem!
I want to make something so "notes" webpage - something very little for now!
I make little base in MySQL in four cells. (id, name, RQtext, Complate)
I make a connection in one file.
And begin with index who combine other two files who i created (inserform.php and getrequest.php)
The problem is in getrequest.php (for now)! I make a table and in this table I extract the data from my table rq1 in this code:
Code: Select all
while($row = mysql_fetch_array($query)){
if($row['Complate'] == 0) {
$id = $row['id'];
$statusrq = "<td align=center> <input type=submit value=изпълни name=statusfalse id=$id> </td>";
echo "<form action=index.php method=POST>";
echo "<tr bgcolor=red>";
echo "<td>";
echo $id;
echo "</td><td>";
echo $row['name'];
echo "</td><td>";
echo $row['RQtext'];
echo "</td>";
echo $statusrq;
echo "</tr>";
echo "</form>";
if(isset($_POST['statusfalse'])) {
$sql = "UPDATE rq1 SET Complate=1 WHERE id=$id";
$result = mysql_query($sql);
}
} else {
$statusrq = "<td align=center bgcolor=lightblue> <b>завършена</b> </td>";
echo "<tr bgcolor=lightblue>";
echo "<td>";
echo $row['id'];
echo "</td><td>";
echo $row['name'];
echo "</td><td>";
echo $row['RQtext'];
echo "</td>";
echo $statusrq;
echo "</tr>";
}
}
echo "</table>";For look how must look
http://bg-media.net/learning/notes/