Link to home
Start Free TrialLog in
Avatar of livegirllove
livegirllove

asked on

PHP mySQL rollup problem

Ok I have a problem that I cant seem to wrap my head around.  I have a page http://www.generalstorecafe.com/band_next_month.php that needs to be a little different.  Im not sure even how to approach the problem.  They want to be able to always show the current info.  i thought about setting up the page to display the top 15 rows in the db.  Problem with that is how would you setup the input page so that they could make changes after updateing the page.  this is the update page I use now:  ANy thoughts on how this can be accomplished?  It has to be simple for the client.  I was thinking about having  seperate pages for this week/this month/next month then find a command that will copy the data from tableA to tableB.  That way they would at least only have to enter data once.  At the end of the month they just use the copy function and then add new info to the current month.

Ok lets here some feed back ;-)
This is probably going to be a long thread with double points  

<?
include("../db.php"); // setup connection to mysql
if($_POST["submit"]) { // if form submitted
  $query = "UPDATE band2 SET
month = '" . $_POST["month"] . "',
date1 = '" . $_POST["date1"] . "',
date2 = '" . $_POST["date2"] . "',
date3 = '" . $_POST["date3"] . "',
date4 = '" . $_POST["date4"] . "',
date5 = '" . $_POST["date5"] . "',
date6 = '" . $_POST["date6"] . "',
date7 = '" . $_POST["date7"] . "',
date8 = '" . $_POST["date8"] . "',
date9 = '" . $_POST["date9"] . "',
date10 = '" . $_POST["date10"] . "',
date11 = '" . $_POST["date11"] . "',
date12 = '" . $_POST["date12"] . "',
date13 = '" . $_POST["date13"] . "',
date14 = '" . $_POST["date14"] . "',
date15 = '" . $_POST["date15"] . "',
date16 = '" . $_POST["date16"] . "',
date17 = '" . $_POST["date17"] . "',
date18 = '" . $_POST["date18"] . "',
date19 = '" . $_POST["date19"] . "',
date20 = '" . $_POST["date20"] . "',
image1 = '" . $_POST["image1"] . "',
image2 = '" . $_POST["image2"] . "',
image3 = '" . $_POST["image3"] . "',
image4 = '" . $_POST["image4"] . "',
image5 = '" . $_POST["image5"] . "',
image6 = '" . $_POST["image6"] . "',
image7 = '" . $_POST["image7"] . "',
image8 = '" . $_POST["image8"] . "',
image9 = '" . $_POST["image9"] . "',
image10 = '" . $_POST["image10"] . "',
image11 = '" . $_POST["image11"] . "',
image12 = '" . $_POST["image12"] . "',
image13 = '" . $_POST["image13"] . "',
image14 = '" . $_POST["image14"] . "',
image15 = '" . $_POST["image15"] . "',
image16 = '" . $_POST["image16"] . "',
image17 = '" . $_POST["image17"] . "',
image18 = '" . $_POST["image18"] . "',
image19 = '" . $_POST["image19"] . "',
image20 = '" . $_POST["image20"] . "',
band1 = '" . $_POST["band1"] . "',
band2 = '" . $_POST["band2"] . "',
band3 = '" . $_POST["band3"] . "',
band4 = '" . $_POST["band4"] . "',
band5 = '" . $_POST["band5"] . "',
band6 = '" . $_POST["band6"] . "',
band7 = '" . $_POST["band7"] . "',
band8 = '" . $_POST["band8"] . "',
band9 = '" . $_POST["band9"] . "',
band10 = '" . $_POST["band10"] . "',
band11 = '" . $_POST["band11"] . "',
band12 = '" . $_POST["band12"] . "',
band13 = '" . $_POST["band13"] . "',
band14 = '" . $_POST["band14"] . "',
band15 = '" . $_POST["band15"] . "',
band16 = '" . $_POST["band16"] . "',
band17 = '" . $_POST["band17"] . "',
band18 = '" . $_POST["band18"] . "',
band19 = '" . $_POST["band19"] . "',
band20 = '" . $_POST["band20"] . "',
link1 = '" . $_POST["link1"] . "',
link2 = '" . $_POST["link2"] . "',
link3 = '" . $_POST["link3"] . "',
link4 = '" . $_POST["link4"] . "',
link5 = '" . $_POST["link5"] . "',
link6 = '" . $_POST["link6"] . "',
link7 = '" . $_POST["link7"] . "',
link8 = '" . $_POST["link8"] . "',
link9 = '" . $_POST["link9"] . "',
link10 = '" . $_POST["link10"] . "',
link11 = '" . $_POST["link11"] . "',
link12 = '" . $_POST["link12"] . "',
link13 = '" . $_POST["link13"] . "',
link14 = '" . $_POST["link14"] . "',
link15 = '" . $_POST["link15"] . "',
link16 = '" . $_POST["link16"] . "',
link17 = '" . $_POST["link17"] . "',
link18 = '" . $_POST["link18"] . "',
link19 = '" . $_POST["link19"] . "',
link20 = '" . $_POST["link20"] . "',
desc1 = '" . $_POST["desc1"] . "',
desc2 = '" . $_POST["desc2"] . "',
desc3 = '" . $_POST["desc3"] . "',
desc4 = '" . $_POST["desc4"] . "',
desc5 = '" . $_POST["desc5"] . "',
desc6 = '" . $_POST["desc6"] . "',
desc7 = '" . $_POST["desc7"] . "',
desc8 = '" . $_POST["desc8"] . "',
desc9 = '" . $_POST["desc9"] . "',
desc10 = '" . $_POST["desc10"] . "',
desc11 = '" . $_POST["desc11"] . "',
desc12 = '" . $_POST["desc12"] . "',
desc13 = '" . $_POST["desc13"] . "',
desc14 = '" . $_POST["desc14"] . "',
desc15 = '" . $_POST["desc15"] . "',
desc16 = '" . $_POST["desc16"] . "',
desc17 = '" . $_POST["desc17"] . "',
desc18 = '" . $_POST["desc18"] . "',
desc19 = '" . $_POST["desc19"] . "',
desc20 = '" . $_POST["desc20"] . "'";

 // update your field in your table
  $result = mysql_query($query) or die(mysql_error()); // exec query
  print "Bands of the Month updated";
}
$q = "SELECT * FROM band2 LIMIT 1"; // get the current entry
$r = mysql_query($q) or die(mysql_error()); // exec
$row = mysql_fetch_assoc($r); // fetch the row

?>
<html>
<head>
 <script language="JavaScript">
function popUp(URL) {
n=window.open(URL, 'popup', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=360,height=520');
n.focus();
if(!n.closed) n.focus();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>General Store Cafe Next MOnths Band Listing Update Page</title></head>
<body>
<table width="765" border="15" align="center" bordercolor="#339933">
  <tr>
<td>

<div align="center">
        <p><font color="#FF00FF" size="4" face="Papyrus"><strong>Bands of the
          Month Update Page:</strong></font></p>
        <p><strong><font color="#FF00FF" size="4" face="Papyrus">This Month</font></strong></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">Click the Update
          button 1 time after filling in the blanks. If a field is left blank
          nothing will show up in that spot on the Bands Page. This will not cause
          the program to fail!! It will just leave a blank space on the page.</font><br>
        </p>
      </div>

<form action="<? print $_SERVER["../PHP_SELF"]; ?>" method="POST">
        <p>
          <input type="text" name="month" value="<? print $row["month"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Month<a href="JavaScript:popUp('band_pop_month.htm');">?Help?</a></font></p>
        <hr>
        <p>
          <input type="text" name="date1" value="<? print $row["date1"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date <a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image1" value="<? print $row["image1"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link1" type="text" id="link1" value="<? print $row["link1"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band1" value="<? print $row["band1"]; ?>">
          Band Name</font></p>
                     
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc1" cols="75" rows="5"><? print $row["desc1"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date2" value="<? print $row["date2"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image2" value="<? print $row["image2"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link2" type="text" id="link2" value="<? print $row["link2"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band2" value="<? print $row["band2"]; ?>">
          Band</font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc2" cols="75" rows="5"><? print $row["desc2"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date3" value="<? print $row["date3"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image3" value="<? print $row["image3"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link3" type="text" id="link3" value="<? print $row["link3"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band3" value="<? print $row["band3"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc3" cols="75" rows="5"><? print $row["desc3"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date4" value="<? print $row["date4"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date <a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image4" value="<? print $row["image4"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link4" type="text" value="<? print $row["link4"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band4" value="<? print $row["band4"]; ?>">
          Band Name</font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc4" cols="75" rows="5"><? print $row["desc4"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date5" value="<? print $row["date5"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image5" value="<? print $row["image5"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link5" type="text" value="<? print $row["link5"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band5" value="<? print $row["band5"]; ?>">
          Band</font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc5" cols="75" rows="5"><? print $row["desc5"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date6" value="<? print $row["date6"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image6" value="<? print $row["image6"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link6" type="text" value="<? print $row["link6"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band6" value="<? print $row["band6"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc6" cols="75" rows="5"><? print $row["desc6"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date7" value="<? print $row["date7"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date </font><font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image7" value="<? print $row["image7"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link7" type="text" value="<? print $row["link7"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band7" value="<? print $row["band7"]; ?>">
          Band Name</font></p>
                     
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc7" cols="75" rows="5"><? print $row["desc7"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date8" value="<? print $row["date8"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image8" value="<? print $row["image8"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link8" type="text" value="<? print $row["link8"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band8" value="<? print $row["band8"]; ?>">
          Band</font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc8" cols="75" rows="5"><? print $row["desc8"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date9" value="<? print $row["date9"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image9" value="<? print $row["image9"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link9" type="text" value="<? print $row["link9"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band9" value="<? print $row["band9"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc9" cols="75" rows="5"><? print $row["desc9"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date10" value="<? print $row["date10"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date <a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image10" value="<? print $row["image10"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link10" type="text" value="<? print $row["link10"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band10" value="<? print $row["band10"]; ?>">
          Band Name</font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc10" cols="75" rows="5"><? print $row["desc10"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date11" value="<? print $row["date11"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image11" value="<? print $row["image11"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link11" type="text" value="<? print $row["link11"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band11" value="<? print $row["band11"]; ?>">
          Band</font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc11" cols="75" rows="5"><? print $row["desc11"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date12" value="<? print $row["date12"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image12" value="<? print $row["image12"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link12" type="text" value="<? print $row["link12"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band12" value="<? print $row["band12"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc12" cols="75" rows="5"><? print $row["desc12"]; ?></textarea>
          Description </font></p>
        <p>
          <input type="text" name="date13" value="<? print $row["date13"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date </font><font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image13" value="<? print $row["image13"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link13" type="text" value="<? print $row["link13"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band13" value="<? print $row["band13"]; ?>">
          Band Name</font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc13" cols="75" rows="5"><? print $row["desc13"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date14" value="<? print $row["date14"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image14" value="<? print $row["image14"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link14" type="text" value="<? print $row["link14"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band14" value="<? print $row["band14"]; ?>">
          Band</font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc14" cols="75" rows="5"><? print $row["desc14"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date15" value="<? print $row["date15"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image15" value="<? print $row["image15"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link15" type="text" value="<? print $row["link15"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band15" value="<? print $row["band15"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc15" cols="75" rows="5"><? print $row["desc15"]; ?></textarea>
          Description </font></p>

        <hr>
        <p>
          <input type="text" name="date16" value="<? print $row["date16"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image16" value="<? print $row["image16"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link16" type="text" value="<? print $row["link16"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band16" value="<? print $row["band16"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc16" cols="75" rows="5"><? print $row["desc16"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date17" value="<? print $row["date17"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image17" value="<? print $row["image17"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link17" type="text" value="<? print $row["link17"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band17" value="<? print $row["band17"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc17" cols="75" rows="5"><? print $row["desc17"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date18" value="<? print $row["date18"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image18" value="<? print $row["image18"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link18" type="text" value="<? print $row["link18"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band18" value="<? print $row["band18"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc18" cols="75" rows="5"><? print $row["desc18"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date19" value="<? print $row["date19"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image19" value="<? print $row["image19"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link19" type="text" value="<? print $row["link19"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band19" value="<? print $row["band19"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc19" cols="75" rows="5"><? print $row["desc19"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>
          <input type="text" name="date20" value="<? print $row["date20"]; ?>">
          <font face="Geneva, Arial, Helvetica, sans-serif">Date</font> <font face="Geneva, Arial, Helvetica, sans-serif"><a href="JavaScript:popUp('band_pop_date.htm');">?Help?</a></font>
        </p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="image20" value="<? print $row["image20"]; ?>">
          Image URL <a href="JavaScript:popUp('band_image_pop.htm');">?Help?</a></font></p>
        <p><font face="Geneva, Arial, Helvetica, sans-serif">
          <input name="link20" type="text" value="<? print $row["link20"]; ?>">
          Link <a href ="JavaScript:popUp('band_pop_link.htm');">?Here?</a></font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <input type="text" name="band20" value="<? print $row["band20"]; ?>">
          Band </font></p>
        <p> <font face="Geneva, Arial, Helvetica, sans-serif">
          <textarea name="desc20" cols="75" rows="5"><? print $row["desc20"]; ?></textarea>
          Description </font></p>
        <hr>
        <p>&nbsp;</p>
        <p> </p>
        <p>&nbsp;</p>
        <p> <br />
          <input type="submit" name="submit" value="Update Bands of This Month">
          <input type="hidden" name="submit" value="Update Special Menu">
        </p>
        <p align="center"><a href="input_band_current.php">Band Current Week</a>
          <a href="input_band_next_month.php">Band Current Month</a> <a href="input_featured_art.php">Art</a>
          <a href="input_consignment.php">Consignment</a> <a href="input_special_menu.php">Specials</a>
          <a href="input_links.php">Links</a> <a href="input_specialevents.php">Special
          Events</a> <a href="input_fundraiser.php">Fundraisers</a></p>
  </form>
  </td></tr>
</table>
</body>
</html>
ASKER CERTIFIED SOLUTION
Avatar of rlawley
rlawley

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of livegirllove
livegirllove

ASKER

Can you show me what the admin page would look like?  Maybe a screen shot?  I think you may be onto something here.  Ill have more questions, then.  
SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
euh, u had better copy-paste the code in some editor that will let u see the difference between a double-quote and two quotes to get it right. sorry i didn't know the output would be like that
my code must contain some bugs but they'll be quite easy to fix, assuming that u use mysql_error() to bebug querys
-- actually i just saw the parenthesis were missing in the insert query, should be (remove the Xs)
if(!mysql_query("insert into $table '".implode("','",array_keys($POST))."' values X(X'".implode("','",$POST)."'X)X")