Hi
I having a bit of trouble to print the passed data through a URL in my form...below is my code
$car_id= $_GET['car_id'];
//the URL does show the id e.g. edit.php?car_id=1
// did an echo here to test if its caught correctly and it works
$query = "SELECT manufacturer, make, year, price FROM cars WHERE car_id = '$car_id'";
$result = mysql_query($query)
while($row = mysql_fetch_array(result)){
$manufacturer = $row['manufacturer'];
$make = $row['make'];
$year = $row['year'];
$price = $row['price'];
//i tried and echo here as well for $manufacturer but it does not print anything
Then I have my form:
<form Method="POST" ACTION="edit.php">
<table border="2" align="center">
<tr>
<td>Manufacturer</td><td><input name="manufacturer" type="text" value=<?php echo "$manufacturer ?>"></input></td>
</tr>
<tr>
<td>Make</td><td><input name="make" type="text" value=<?php echo "$make?>></input></td>
</tr>
//and so on...I just need to data displayed in the form so that the user can edit it and update the records in the database, but nothing prints on the form...Any assistance will be much appreciated
Thanks🙂