Hi all,
Why won't this update? The radio buttons don't seem to update causing the error.
<?
session_start();
//check session variable
if (session_is_registered("valid_user"))
{
?>
<?php
include ("include/header.inc.php");
include ("include/dbconnect.php");
if ($submit) {
$sql = "UPDATE $table SET status='$status' WHERE app_id=$app_id";
$result = mysql_query($sql);
if($result){
echo "<br>Information updated.\n";
}
else{
echo "<br><font color=\"red\"><b>ERROR:</b> Your data could not be updated</font>\n";
}
}
else if($id){
$result = mysql_query("SELECT * FROM $table WHERE app_id=$id",$db);
$links = mysql_fetch_array($result);
$first_name = $links["first_name"];
$status = $links["status"];
echo "<b>Name:</b> $first_name<br>";
?>
<br>
<form method="post" action="view.php">
<input type="radio" name="status" value="no">
NEW
<input type="radio" name="status" value="yes">
ACCEPTED
<input type="submit" name="submit" value="Submit">
</form>
<?
}
?>
<?
}
else
{
// You are not logged in.
//Only logged in members may see this page.
require("warning.php");
}
?>