I'm running into the same problem, I'm still pretty new to PHP however I can fumble around. I'm reusing a piece of code that worked on a browser exactly like koop had.
Submitting the form to itself. I've read the articles attached although if i try to replace $submit with $post['submit'] or $GET['submit'] I get an undefined index instead. I'm sure it's something simple I'm missing!
<form method="post" action="<?php echo $_SERVER['PHP_SELF'].'?id='.$_GET['id']; ?>">
<table>
<tr>
<td>Issue Id</td>
<td><?php echo $row['id'];?></td>
</tr>
<tr>
<td>Issue Tech</td>
<td><?php echo $row['tech'];?></td>
</tr>
<tr>
<td>Issue Date</td>
<td><?php echo $row['date'];?></td>
</tr>
<tr>
<td>Issue Description</td>
<td><textarea name=issue rows=5 cols=30 name=issue><?php echo $row['issue'];?></textarea></td>
</tr>
<tr>
<td>Issue Resolution</td>
<td><textarea name=resolve rows=5 cols=30 name=resolve></textarea></td>
</tr>
<tr>
<td>Status</td>
<td>
<select name="status">
<option value="open">open</option>
<option value="closed">closed</option>
</select>
</td>
</tr>
<tr>
<td>Computer Name</td>
<td><?php echo $row['comp'];?></td>
</tr>
</table>
<input type="Submit" value="Submit Issue Change" name="submit">
<?php
if ($submit) {
// process form
/* Build SQL Connection. */
$serverName = "asdfa";
$myUser = "adsfar";
$myPass = "adsf";
$connectionOptions = array( "UID"=>$myUser,
"PWD"=>$myPass,
"Database"=>"tracking");
/* Connect using Windows Authentication. */
$conn = sqlsrv_connect( $serverName, $connectionOptions);
if (!$conn)
{
die('Could not connect: ' . sqlsrv_error());
}
$sql = "UPDATE issueList SET issue='$issue', resolution='$resolve', status='$status' WHERE id=".$_GET['id'];
$result = sqlsrv_query($sql,$conn);
echo sqlsrv_error();
echo "Contact information has been updated!\n";
}
?>