PHP GET issue - it aint workin!
Posted
by
benhowdle89
on Stack Overflow
See other posts from Stack Overflow
or by benhowdle89
Published on 2011-01-11T13:43:02Z
Indexed on
2011/01/11
13:54 UTC
Read the original article
Hit count: 219
I have a simple PHP form which displays inputs with values from a mysql DB and send the form results to another page which updates a db table based on the GET results:
echo "<form method='get' action='updateprojects.php'>";
echo "<table>";
echo "<tr>";
echo " <th>Project No</th>
<th>Customer Name</th>
<th>Description</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><input value=" . $row['project_no'] . "></input></td>";
echo "<td><input value='" . $row['cust_name'] . "'></input></td>";
echo "<td><input value='" . $row['description'] . "'></input></td>";
echo "</tr>";
}
echo "</table>";
echo "<input type='submit' value='Update' />";
echo "</form>";
on updateprojects.php i have set up the GET variable and even echoed them to check but nothing comes through! Cannot see why!?
This is the start of updateprojects.php:
echo $_GET['project_no'].$_GET['cust_name'].$_GET['description'];
© Stack Overflow or respective owner