I would like to open a form using a PHP URL by id. The URL looks like this.
http://localhost/application/workordersystem/woformEditor.php?woid=4
And receiving the id into PostgreSQL like this.
if (isset($_GET['woid']))
{
$query = "SELECT * FROM orders WHERE woid='$woid'";
$result = pg_query($query) or die(pg_error());
$row = pg_fetch_assoc($result);
}
I need the forms input fields to be filled with database data by the id in the database. What am I missing?
<input type="text" name="status" id="status" value="<?php echo $row['status']; ?>" />