I'm sorry, I thought that I had attached it. It's been that kind of weekend ...
The form is inserted into a column of the table, and is found near the end of the code.
<?php
$dbcnx = @mysql_connect('localhost', 'sculptevv', '13468022');
if (!$dbcnx) {
exit('<p>Unable to connect to the database server at this time.</p>');
}
if (!@mysql_select_db('sculptevv_evv')) {
exit('<p>Unable to locate the database at this time.</p>');
}
echo '<p>Here are all the entries in our database:</p>';
$artlist = @mysql_query('SELECT tblEntries.id, tblUser.id, artid, userid, title, medium, completed, height, width, depth, weight, price, description, site1, site2, site3, locationreason, installation, equipment, manhours, maintainance, availability, accepted, fname, lname, statement, cv FROM tblEntries, tblUser WHERE tblEntries.userid=tblUser.id AND tblEntries.id>100');
if (!$artlist) {
exit('<p>Error perfoming query: ' . mysql_error() . '</p>');
}
echo '<table border="1" cellpadding="6" cellspacing="0">
<tr bgcolor="#dedede"><td width="25"></td><td width="100">Artist</td><td width="100">Statement</td><td width="50">CV</td><td width="250">title</td><td width="100">medium</td><td width="100">Date Completed</td><td width="100">Dimensions<br />Weight</td><td width="100">Price</td><td width="100">Description</td><td width="100">Site Selection</td><td width="100">Site Reason</td><td width="100">Installation</td><td width="100">Equipment</td><td width="100">Man hours</td><td width="100">Maintainance</td><td width="100">Availability</td><td width="50">In/Out</td></tr>';
$artnumber = 1;
while ($art = mysql_fetch_array($artlist)) {
/* $forsale = $art['forsale'];
If ($forsale == 0) {
$value = nfs;
} else {
$price = $art['value'];
$value = "$$price.00";
}
*/
$id = $art['id'];
$artid = $art['artid'];
$arttitle = $art['title'];
$artmedium = $art['medium'];
$completed = $art['completed'];
$height = $art['height'];
$width = $art['width'];
$depth = $art['depth'];
$weight = $art['weight'];
$price = $art['price'];
$description = $art['description'];
$site1 = $art['site1'];
$site2 = $art['site2'];
$site3 = $art['site3'];
$locationreason = $art['locationreason'];
$installation = $art['installation'];
$equipment = $art['equipment'];
$manhours = $art['manhours'];
$maintainance = $art['maintainance'];
$availability = $art['availability'];
$accepted = $art['accepted'];
$fname = $art['fname'];
$lname = $art['lname'];
$statement = $art['statement'];
$cv = $art['cv'];
echo "<tr><td bgcolor='$accepted'>$artnumber</td>
<td>$fname $lname</td>
<td><a href='upload/$id/statement/$statement'>Artist's Statement</a></td>
<td><a href='upload/$id/cv/$cv'>CV</a></td>
<td><i>$arttitle</i><br />";
$url='upload/' . $id . '/entries/' . $artid . '/views';
$dir = opendir($url);
$fcount = 0;
//List files in images directory
while (($file = readdir($dir)) !== false)
{
if (eregi("\.jpg",$file)) {
$imgurl = $url . '/' . $file;
if ($fcount <1) {
echo "<a href='$url/$file' rel='lightbox[$id$artid]'><img src='$url/$file' width='90' /></a>";
$fcount ++;
} else {
echo "<a href='$url/$file' rel='lightbox[$id$artid]'></a>";
}
}
}
closedir($dir);
echo "<br /><br />Details:";
$url='upload/' . $id . '/entries/' . $artid . '/details';
$dir = opendir($url);
$fcount = 0;
//List files in images directory
while (($file = readdir($dir)) !== false)
{
if (eregi("\.jpg",$file)) {
$imgurl = $url . '/' . $file;
if ($fcount <1) {
echo "<a href='$url/$file' rel='lightbox[d$id$artid]'><img src='$url/$file' width='90' /></a>";
$fcount ++;
} else {
echo "<a href='$url/$file' rel='lightbox[d$id$artid]'></a>";
}
}
}
closedir($dir);
echo "</td>
<td>$artmedium</td>
<td>$completed</td>
<td>$height x $width x $depth<br />$weight</td>
<td>$price</td>
<td>$description</td>
<td>First Choice: $site1<br />Second Choice: $site2<br />Third Choice: $site3</td>
<td>$locationreason</td>
<td>$installation<br />";
$url='upload/' . $id . '/entries/' . $artid . '/installation';
$dir = opendir($url);
$fcount = 0;
//List files in images directory
while (($file = readdir($dir)) !== false)
{
if (eregi("\.jpg",$file)) {
$imgurl = $url . '/' . $file;
if ($fcount <1) {
echo "<a href='$url/$file' rel='lightbox[i$id$artid]'><img src='$url/$file' width='90' /></a>";
$fcount ++;
} else {
echo "<a href='$url/$file' rel='lightbox[i$id$artid]'></a>";
}
}
}
closedir($dir);
echo "</td>
<td>$equipment</td>
<td>$manhours</td>
<td>$maintainance</td>
<td>$availability</td>
<td>
<form action='"; $_SERVER['PHP_SELF']; echo"' method='post'>
<label>Yes or No:<br />
<textarea name='accepted' rows='1' cols='20'>
</textarea></label><br />
<input type='submit' value='SUBMIT' />
</form>";
if (isset($_POST['accepted'])) {
$accepted = $_POST['accepted'];
$sql = "INSERT INTO tblEntries SET accepted='$accepted'";
if (@mysql_query($sql)) {
echo '<p>Your joke has been added.</p>';
} else {
echo '<p>Error adding submitted joke: ' .
mysql_error() . '</p>';
}
}
echo "</td></tr>";
$artnumber ++;
}
echo '</table>';
?>