Okay I know that sounded like begging, but since I dont realy want to take a bat to my pc yet (haha) I thought i better ask for some help.
This is what I have so far.... I figured out how to get the data to show up, even seperate the years for the past shows, and how to use a form to add the data... but I dont know how to get my delete and edit buttons to work. I have tried hundreds of examples and tried to learn from some others that i downloaded, but I cant seem to get anything to work for this. Please help me get the buttons to work.. this is what I have for the edit page. All can be seen at (What I have so far) http://www.blyster.com/bschedule/bsadmin/index3.php
This is the script I have so far:
<html>
<head>
</head>
<body link="#990000" vlink="#990000" alink="#990000">
<style type="text/css"> body {background-color: transparent} </style>
<?php
echo "<br><br><br><form method=\"post\" action=\"bsdataprocessor.php\">";
$getswitch = $_GET['switch'];
if($getswitch == 1) {
$db = mysql_connect("localhost","blysterc_b21","test");
mysql_select_db('blysterc_bschedule') or die("Could not get db. Reason why: ".mysql_error());
$query = "select * from schedule";
$result = mysql_query($query) or die("Could not do a mysql query. Reason why: ".mysql_error());
echo "<table border=1 cellpsdding=2 cellspacing=2 width=100%>";
while($queryarray = mysql_fetch_array($result)) {
$timestamp = strtotime($queryarray['bsdate']);
$new_formatted = date ("F jS Y", $timestamp);
$newtime = str_replace(" ", '<br>',$new_formatted);
echo "<tr>";
echo "<td align=\"center\" >".$newtime."</td>";
echo "<td align=\"center\" >".$queryarray['bsvenue']."<br>".$rows['bslocation']."</td>";
echo "<td align=\"center\" >".$queryarray['bsbandlistings']."</td>";
echo "<td align=\"center\" >".$queryarray['bsdetails']."</td>";
echo "<td align=\"center\" ><input type=\"BUTTON\" value=\"Edit\"></td>";
echo "<td align=\"center\" ><input type=\"BUTTON\" value=\"Delete\"></td>";
echo "</tr>";
}
echo"</table>";
mysql_close($db);
}
else {
echo " Year: <select name=\"year\">";
for($i=04; $i<51; $i++)
{
if($i <=9) {
echo"
<option value=200".$i."->200".$i."</option>";
}
else {
echo "
<option value=20".$i."->20".$i."</option>";
}
}
echo "</select>";
echo " Month: <select name=\"month\";>";
for($i=1; $i<13; $i++)
{
if($i <=9) {
echo"
<option value=0".$i."->0".$i."</option>";
}
else {
echo "
<option value=".$i."->".$i."</option>";
}
}
echo "</select>";
echo " Day: <select name=\"day\">";
for($i=1; $i<32; $i++)
{
if($i <=9) {
echo"
<option value=0".$i.">0".$i."</option>";
}
else {
echo "
<option value=".$i.">".$i."</option>";
}
}
echo "</select><br>";
echo "
Venue: <input type=\"text\" name=\"venue\" size=15>
Location: <input type=\"text\" name=\"location\" size=15>
Band Listing: <input type=\"text\" name=\"bandlisting\" size=20><br><br>
<center>
Details:<br> <textarea cols=50 rows=8 name=\"details\" ></textarea>
<br><br>
<input type=\"Submit\" value=\"Add to Schedule\"></center>
</form>
<a href=\"http://www.blyster.com/bschedule/bsadmin/index2.php?switch=1\">Edit Band Schedule</a>
";
}
?>
</body>
</html>
Thanks to all that can help... It's GREATLY appreciated.
Peredy