here's the entire page if that helps
<?
include('include/user_check.php');
include('include/db_con.php');
//won't submit without this, however WITHOUT this when I put in a date and hit submit the page (not the database) updates to whatever i input
//but with this it only displays what i put when it loads, if i then input something different into the box it still only displays what i originally input
if($submit) {
mysql_query("INSERT INTO whiteboard_dates (rest_id, ad_copy_rec) VALUES ('$table_id', '$ad_copy_rec')", $db_link);
}
//end won't submit problem
?>
<html>
<head>
<title>ABC Advertising Agency, Inc :: Whiteboard</title>
<script language="javascript">
function openNewWindow(url) {
window.open(url,'newPage','scrollbars=no,resizable=no,width=400,height=250');
}
</script>
</head>
<body bgcolor="white">
<script type='text/JavaScript' src='scw.js'></script>
<font face="Verdana, Arial, Helvetica, sans-serif">
<div align="center">
<table width="600" border="0" cellspacing="2" cellpadding="1" bgcolor="white">
<tr>
<td colspan="10" width="1343">
<div id="popup"></div>
<center>Whiteboard for<br>
<?php
$query="SELECT * FROM abc_tables WHERE table_id=$table_id";
$result=mysql_query($query);
while ($row = mysql_fetch_assoc($result))
{
$rest_name = $row['rest_name'];
}
echo"$rest_name";
?><br>
<img src="thin_horiz_line.png" width="250" height="1"></center>
</td>
</tr>
<tr>
<td align="center" valign="bottom" width="60"><font size="-2">Advertiser</font></td>
<td align="center" valign="bottom" width="20"><font size="-2">Ad Size</font></td>
<td align="center" valign="bottom" width="75"><font size="-2">Contract Rec</font></td>
<td align="center" valign="bottom" width="35"><font size="-2">Ad Copy Rec</font></td>
<td align="center" valign="bottom" width="30"><font size="-2">Pict</font></td>
<td align="center" valign="bottom" width="30"><font size="-2">Copy Sent Out</font></td>
<td align="center" valign="bottom" width="60"><font size="-2">Approved</font></td>
</tr>
<tr>
<td colspan="10" width="1343">
<div align="center">
<img src="thin_horiz_line.png"></div>
</td>
</tr>
<?php
$query_table="SELECT * FROM abc_tables WHERE table_id=$table_id";
$result_table=mysql_query($query_table);
while ($row_table = mysql_fetch_assoc($result_table))
{
$table_id = $row_table['table_id'];
}
$query_ads="SELECT * FROM ad_order WHERE cust_id=$table_id";
$result_ads=mysql_query($query_ads);
while ($row_ads = mysql_fetch_assoc($result_ads))
{
$id = $row_ads['id'];
$company = $row_ads['company'];
$ad_size = $row_ads['size'];
$contract_rec = $row_ads['date_ordered'];
$query_ads_dates="SELECT * FROM job_log WHERE ad_id=$id";
$result_ads_dates=mysql_query($query_ads_dates);
while ($row_ads_dates = mysql_fetch_assoc($result_ads_dates))
{
$ad_id = $row_ads_dates['ad_id'];
$time = $row_ads_dates['time'];
}
if(isset($_POST['add']))
{
$ad_copy_rec = $_POST['ad_copy_rec'];
$query_insert_ad_copy_rec_dates = "INSERT INTO whiteboard_dates (rest_id, ad_copy_rec) VALUES ('$table_id', '$ad_copy_rec')";
}
$query_ads_rec_dates="SELECT ad_copy_rec FROM whiteboard_dates WHERE rest_id=$table_id";
$result_ads_rec_dates=mysql_query($query_ads_rec_dates);
while ($row_ads_rec_dates = mysql_fetch_assoc($result_ads_rec_dates))
{
$ad_copy_rec = $row_ads_rec_dates['ad_copy_rec'];
}
?>
<tr>
<td colspan="10" width="1343"><div align="center"><IMG SRC="thin_horiz_line.png"></div></TD>
</TR>
<tr>
<td align="center" valign="top" width="60"><font size="-2"><?
echo "$company";
?></font></td>
<td align="center" valign="top" width="60"><font size="-2"><?
echo "$ad_size";
?></font></td>
<td align="center" valign="top" width="60"><font size="-2"><?
echo "$contract_rec";
?></font></td>
<td align="center" valign="top" width="60"><font size="-2"><?
echo "$ad_copy_rec";
?></p>
<form method="post" enctype="multipart/form-data" name="FormName">
<input type="text" class="formTextbox" name="ad_copy_rec" size="24" value='<?php echo"$ad_copy_rec"; ?>'/>
<input type="submit" class="formTextbox" name="submit" value="Submit Ad Copy Rec Date">
</form></font></td>
<td align="center" valign="top" width="60"><font size="-2"><?
echo "";
?></font></td>
<td align="center" width="60"><font size="-2"><?php
$query_ads_dates="SELECT * FROM job_log WHERE ad_id=$id";
$result_ads_dates=mysql_query($query_ads_dates);
while ($row_ads_dates = mysql_fetch_assoc($result_ads_dates))
{
$time = $row_ads_dates['time'];
$upload_date = date('m/d/y',$time);
echo "$upload_date<br>";}
?></font></td>
<td align="center" width="60"><font size="-2"><?php
$query_ads_dates="SELECT * FROM job_log WHERE ad_id=$id";
$result_ads_dates=mysql_query($query_ads_dates);
while ($row_ads_dates = mysql_fetch_assoc($result_ads_dates))
{
$time = $row_ads_dates['date_approved'];
$date_approved = date('m/d/y',$time);
echo "$date_approved<br>";}
?></font></td>
<?php
}
?>
<TR>
<td colspan="10" width="1343"><div align="center"><IMG SRC="thin_horiz_line.png"></div></TD>
</TR>
</TABLE>
</body>
</html>