Hi everyone,
It seems I dont understand the mechanism of sending a parameter from one PHP procedure to another.
Here is the code of the main procedure test.php:
When I run the main "test.php", I receive an error message from test1.php that says:
Can anyone explain me why do I get that error and how to pass the parameter from test.php to test1.php?
Thanks
It seems I dont understand the mechanism of sending a parameter from one PHP procedure to another.
Here is the code of the main procedure test.php:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Update Records In MYSQL Database Using PHP</title>
</head>
<body>
<!--connecting to database-->
<?php
$con = mysqli_connect('aa', 'bb', 'cc', 'dd');
IF(!$con)
DIE('Gevald' .MYSQLI_CONNECT_ERROR());
$records = mysqli_query($con, "SELECT * FROM stations");
?>
<table>
<tr>
<th>ID</th>
<th>Name</th>
<th> </th>
</tr>
<?php
while($row = mysqli_fetch_array($records))
{
echo "<tr><form action = 'test.php' method = 'post'>";
echo "<td><input type = 'text' name = 'mkt_id' value = '".$row['id']."'></td>";
echo "<td><input type = 'text' name = 'mkt_name' value = '".$row['name']."'></td>";
echo "<td><a href='test1.php?edit_mkt=".$row['id']."'>edit</a></td>";
echo "</form></tr>";
}
?>
</table>
</body>
</html>
Can anyone explain me why do I get that error and how to pass the parameter from test.php to test1.php?
Thanks