--- Begin Message ---
Hi,
I was wondering what you would do in this situation...
I have a form, with 196 fields that I need entered into a database.
But the form and it's contents need to be changed every day,
and I need to store the old data in an archive so it can be accessed
at a later date.
That means that after a week, I'm going to have a tonne of data.
Catch is, this form will be used every day for about 3 years.
I'm pretty certain MySQL can handle it, but I need to know, what
would be the best way to store this data?
I've set up a calendar, that will take the user to a different version
of the form every day.
Accesible here:
http://www.fernwoodwhc.com/shit/calendar.php
And the form I'm talking about is here:
http://www.fernwoodwhc.com/tech.php
Here's a copy (minus passwords) of my form...
I'm sure that there's a better way to do it...
<html>
<?
$usr = "username";
$pwd = "password";
$db = "fmms";
$host = "localhost";
$cid = mysql_connect($host,$usr,$pwd);
if (!$cid) { echo("ERROR: " . mysql_error() . "\n"); }
$SQL = " INSERT INTO tech";
$SQL = $SQL . " ('fs6, num6, sur6, giv6, apt6, ph6, c6, fs63, num63,
sur63, giv63, apt63, ph63, c63, fs7, num7, sur7, giv7, apt7, ph7, c7, fs73,
num73, sur73, giv73, apt73, ph73, c73, fs8, num8, sur8, giv8, apt8, ph8, c8,
fs83, num83, sur83, giv83, apt83, ph83, c83, fs9, num9, sur9, giv9, apt9,
ph9, c9, fs93, num93, sur93, giv93, apt93, ph93, c93, fs10, num10, sur10,
giv10, apt10, ph10, c10, fs103, num103, sur103, giv103, apt103, ph103, c103,
fs11, num11, sur11, giv11, apt11, ph11, c11, fs113, num113, sur113, giv113,
apt113, ph113, c113, fs12, num12, sur12, giv12, apt12, ph12, c12, fs123,
num123, sur123, giv123, apt123, ph123, c123, fs1, num1, sur1, giv1, apt1,
ph1, c1, fs13, num13, sur13, giv13, apt13, ph13, c13, fs2, num2, sur2, giv2,
apt2, ph2, c2, fs23, num23, sur23, giv23, apt23, ph23, c23, fs3, num3, sur3,
giv3, apt3, ph3, c3, fs33, num33, sur33, giv33, apt33, ph33, c33, fs4, num4,
sur4, giv4, apt4, ph4, c4, fs43, num43, sur43, giv43, apt43, ph43, c43, fs5,
num5, sur5, giv5, apt5, ph5, c5, fs53, num53, sur53, giv53, apt53, ph53,
c53, fs6p, num6p, sur6p, giv6p, apt6p, ph6p, c6p, fs63p, num63p, sur63p,
giv63p, apt6p3, ph63p, c63p, fs7p, num7p, sur7p, giv7p, apt7p, ph7p, c7p,
fs73p, num73p, sur73p, giv73p, apt7p3, ph73p, c73p') VALUES ";
$SQL = $SQL . " ('$fs6', '$num6', '$sur6', '$giv6', '$apt6', '$ph6',
'$c6', '$fs63', '$num63', '$sur63', '$giv63', '$apt63', '$ph63', '$c63',
'$fs7', '$num7', '$sur7', '$giv7', '$apt7', '$ph7', '$c7', '$fs73',
'$num73', '$sur73', '$giv73', '$apt73', '$ph73', '$c73', '$fs8', '$num8',
'$sur8', '$giv8', '$apt8', '$ph8', '$c8', '$fs83', '$num83', '$sur83',
'$giv83', '$apt83', '$ph83', '$c83', '$fs9', '$num9', '$sur9', '$giv9',
'$apt9', '$ph9', '$c9', '$fs93', '$num93', '$sur93', '$giv93', '$apt93',
'$ph93', '$c93', '$fs10', '$num10', '$sur10', '$giv10', '$apt10', '$ph10',
'$c10', '$fs103', '$num103', '$sur103', '$giv103', '$apt103', '$ph103',
'$c103', '$fs11', '$num11', '$sur11', '$giv11', '$apt11', '$ph11', '$c11',
'$fs113', '$num113', '$sur113', '$giv113', '$apt113', '$ph113', '$c113',
'$fs12', '$num12', '$sur12', '$giv12', '$apt12', '$ph12', '$c12', '$fs123',
'$num123', '$sur123', '$giv123', '$apt123', '$ph123', '$c123', '$fs1',
'$num1', '$sur1', '$giv1', '$apt1', '$ph1', '$c1', '$fs13', '$num13',
'$sur13', '$giv13', '$apt13', '$ph13', '$c13', '$fs2', '$num2', '$sur2',
'$giv2', '$apt2', '$ph2', '$c2', '$fs23', '$num23', '$sur23', '$giv23',
'$apt23', '$ph23', '$c23', '$fs3', '$num3', '$sur3', '$giv3', '$apt3',
'$ph3', '$c3', '$fs33', '$num33', '$sur33', '$giv33', '$apt33', '$ph33',
'$c33', '$fs4', '$num4', '$sur4', '$giv4', '$apt4', '$ph4', '$c4', '$fs43',
'$num43', '$sur43', '$giv43', '$apt43', '$ph43', '$c43', '$fs5', '$num5',
'$sur5', '$giv5', '$apt5', '$ph5', '$c5', '$fs53', '$num53', '$sur53',
'$giv53', '$apt53', '$ph53', '$c53', '$fs6p', '$num6p', '$sur6p', '$giv6p',
'$apt6p', '$ph6p', '$c6p', '$fs63p', '$num63p', '$sur63p', '$giv63p',
'$apt6p3', '$ph63p', '$c63p', '$fs7p', '$num7p', '$sur7p', '$giv7p',
'$apt7p', '$ph7p', '$c7p', '$fs73p', '$num73p', '$sur73p', '$giv73p',
'$apt7p3', '$ph73p', '$c73p') ";
$result = mysql_db_query($db,"$SQL",$cid);
if (!$result) { echo("ERROR: " . mysql_error() . "\n$SQL\n"); }
// echo ("Data Added\n");
mysql_close($cid);
}
?>
<head>
<STYLE TYPE="TEXT/CSS">
BODY {
scrollbar-3dlight-color : #3893CF;
scrollbar-arrow-color : #000000;
scrollbar-base-color : #000000;
scrollbar-darkshadow-color : #3893CF;
scrollbar-face-color : #3893CF;
scrollbar-highlight-color : #000000;
scrollbar-shadow-color : #000000;
scrollbar-track-color : #3893CF;
}
</STYLE>
</head>
<body bgcolor="#3893CF" topmargin="0" leftmargin="0">
<form action="" method="POST">
<table border="0" cellspacing="5" style="border-collapse: collapse"
bordercolor="#111111">
<tr>
<td align="center"><b><font size="2">Time</font></b></td>
<td align="center"><b><font size="2">FW/SP</font></b></td>
<td align="center"><b><font size="2">#</font></b></td>
<td align="center"><b><font size="2">Surname</font></b></td>
<td align="center"><b><font size="2">Given</font></b></td>
<td align="center"><b><font size="2">Appt</font></b></td>
<td align="center"><b><font size="2">Phone</font></b></td>
<td align="center"><b><font size="2">C</font></b></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">6:00 am</font></b></td>
<td><input type="radio" name="fs6" value="fw"><input type="radio"
name="fs6" value="sp"></td>
<td><input type="text" name="num6" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur6" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv6" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt6">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph6" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c6" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">6:30 am</font></b></td>
<td><input type="radio" name="fs63" value="fw"><input type="radio"
name="fs63" value="sp"></td>
<td><input type="text" name="num63" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur63" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv63" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt63">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph63" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c63" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">7:00 am</font></b></td>
<td><input type="radio" name="fs7" value="fw"><input type="radio"
name="fs7" value="sp"></td>
<td><input type="text" name="num7" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur7" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv7" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt7">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph7" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c7" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">7:30 am</font></b></td>
<td><input type="radio" name="fs73" value="fw"><input type="radio"
name="fs73" value="sp"></td>
<td><input type="text" name="num73" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur73" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv73" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt73">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph73" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c73" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">8:00 am</font></b></td>
<td><input type="radio" name="fs8" value="fw"><input type="radio"
name="fs8" value="sp"></td>
<td><input type="text" name="num8" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur8" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv8" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt8">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph8" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c8" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">8:30 am</font></b></td>
<td><input type="radio" name="fs83" value="fw"><input type="radio"
name="fs83" value="sp"></td>
<td><input type="text" name="num83" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur83" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv83" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt83">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph83" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c83" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">9:00 am</font></b></td>
<td><input type="radio" name="fs9" value="fw"><input type="radio"
name="fs9" value="sp"></td>
<td><input type="text" name="num9" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur9" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv9" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt9">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph9" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c9" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">9:30 am</font></b></td>
<td><input type="radio" name="fs93" value="fw"><input type="radio"
name="fs93" value="sp"></td>
<td><input type="text" name="num93" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur93" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv93" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt93">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph93" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c93" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">10:00 am</font></b></td>
<td><input type="radio" name="fs10" value="fw"><input type="radio"
name="fs10" value="sp"></td>
<td><input type="text" name="num10" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur10" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv10" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt10">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph10" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c10" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">10:30 am</font></b></td>
<td><input type="radio" name="fs103" value="fw"><input type="radio"
name="fs103" value="sp"></td>
<td><input type="text" name="num103" size="4" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur103" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv103" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt103">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph103" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c103" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">11:00 am</font></b></td>
<td><input type="radio" name="fs11" value="fw"><input type="radio"
name="fs11" value="sp"></td>
<td><input type="text" name="num11" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur11" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv11" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt11">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph11" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c11" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">11:30 am</font></b></td>
<td><input type="radio" name="fs113" value="fw"><input type="radio"
name="fs113" value="sp"></td>
<td><input type="text" name="num113" size="4" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur113" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv113" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt113">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph113" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c113" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">12:00 pm</font></b></td>
<td><input type="radio" name="fs12" value="fw"><input type="radio"
name="fs12" value="sp"></td>
<td><input type="text" name="num12" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur12" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv12" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt12">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph12" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c12" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">12:30 pm</font></b></td>
<td><input type="radio" name="fs123" value="fw"><input type="radio"
name="fs123" value="sp"></td>
<td><input type="text" name="num123" size="4" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur123" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv123" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt123">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph123" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c123" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">1:00 pm</font></b></td>
<td><input type="radio" name="fs1" value="fw"><input type="radio"
name="fs1" value="sp"></td>
<td><input type="text" name="num1" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur1" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv1" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt1">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph1" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c1" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">1:30 pm</font></b></td>
<td><input type="radio" name="fs13" value="fw"><input type="radio"
name="fs13" value="sp"></td>
<td><input type="text" name="num13" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur13" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv13" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt13">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph13" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c13" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">2:00 pm</font></b></td>
<td><input type="radio" name="fs2" value="fw"><input type="radio"
name="fs2" value="sp"></td>
<td><input type="text" name="num2" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur2" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv2" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt2">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph2" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c2" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">2:30 pm</font></b></td>
<td><input type="radio" name="fs23" value="fw"><input type="radio"
name="fs23" value="sp"></td>
<td><input type="text" name="num23" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur23" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv23" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt23">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph23" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c23" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">3:00 pm</font></b></td>
<td><input type="radio" name="fs3" value="fw"><input type="radio"
name="fs3" value="sp"></td>
<td><input type="text" name="num3" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur3" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv3" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt3">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph3" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c3" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">3:30 pm</font></b></td>
<td><input type="radio" name="fs33" value="fw"><input type="radio"
name="fs33" value="sp"></td>
<td><input type="text" name="num33" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur33" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv33" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt33">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph33" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c33" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">4:00 pm</font></b></td>
<td><input type="radio" name="fs4" value="fw"><input type="radio"
name="fs4" value="sp"></td>
<td><input type="text" name="num4" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur4" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv4" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt4">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph4" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c4" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">4:30 pm</font></b></td>
<td><input type="radio" name="fs43" value="fw"><input type="radio"
name="fs43" value="sp"></td>
<td><input type="text" name="num43" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur43" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv43" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt43">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph43" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c43" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">5:00 pm</font></b></td>
<td><input type="radio" name="fs5" value="fw"><input type="radio"
name="fs5" value="sp"></td>
<td><input type="text" name="num5" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur5" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv5" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt5">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph5" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c5" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">5:30 pm</font></b></td>
<td><input type="radio" name="fs53" value="fw"><input type="radio"
name="fs53" value="sp"></td>
<td><input type="text" name="num53" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur53" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv53" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt53">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph53" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c53" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">6:00 pm</font></b></td>
<td><input type="radio" name="fs6p" value="fw"><input type="radio"
name="fs6p" value="sp"></td>
<td><input type="text" name="num6p" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur6p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv6p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt6p">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph6p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c6p" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">6:30 pm</font></b></td>
<td><input type="radio" name="fs63p" value="fw"><input type="radio"
name="fs63p" value="sp"></td>
<td><input type="text" name="num63p" size="4" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur63p" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv63p" size="8" style="border-style:
solid; border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt63p">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph63p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c63p" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">7:00 pm</font></b></td>
<td><input type="radio" name="fs7p" value="fw"><input type="radio"
name="fs7p" value="sp"></td>
<td><input type="text" name="num7p" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur7p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv7p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt7p">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph7p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c7p" value="ON"></td>
</tr>
<!-- ### -->
<tr>
<td><b><font size="2">7:30 pm</font></b></td>
<td><input type="radio" name="fs73p" value="fw"><input type="radio"
name="fs73p" value="sp"></td>
<td><input type="text" name="num7p" size="4" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="sur7p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="text" name="giv7p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><select size="1" name="apt7p">
<option selected value="1" style="border-style: solid; border-width:
1; background-color:#3893CF">1</option><option value="2"
style="border-style: solid; border-width: 1;
background-color:#3893CF">2</option><option value="re" style="border-style:
solid; border-width: 1; background-color:#3893CF">Re</option></select>
</td>
<td><input type="text" name="ph7p" size="8" style="border-style: solid;
border-width: 1; background-color:#3893CF"></td>
<td><input type="checkbox" name="c7p" value="ON"></td>
</tr>
</table>
<p><input type="submit" value="Submit" name="submit"></p>
</form>
</body>
</html>
Thanks for your help in advance!
- Liam
--- End Message ---
--- Begin Message ---
Arik,
Cute little applet.
For your php project, I still think a map of all the known breweries would
be nice. Everyone could put in their favorite.
Hugh
----- Original Message -----
From: "Arik Ashepa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 09, 2002 10:19 AM
Subject: [PHP] free usefull piece of code for everybody!
> a random image maker based on the gd library (PNG)...
>
----------------------------------------------------------------------------
----
> <?php
> function setPenColors($theimage) {
> global $redpen, $greenpen, $bluepen, $blackpen, $whitepen, $yellowpen,
$aquapen, $fuschiapen, $greypen, $silverpen, $tealpen, $limepen, $navypen,
$purplepen, $maroonpen, $olivepen;
> $redpen = ImageColorAllocate($theimage, 255, 0, 0);
> $greenpen = ImageColorAllocate($theimage, 0, 153, 0);
> $bluepen = ImageColorAllocate($theimage, 0, 0, 255);
> $blackpen = ImageColorAllocate($theimage, 0, 0, 0);
> $whitepen = ImageColorAllocate($theimage, 255, 255, 255);
> $yellowpen = ImageColorAllocate($theimage, 255, 255, 0);
> $aquapen = ImageColorAllocate($theimage, 0, 255, 255);
> $fuschiapen = ImageColorAllocate($theimage, 255, 0, 255);
> $greypen = ImageColorAllocate($theimage, 153, 153, 153);
> $silverpen = ImageColorAllocate($theimage, 204, 204, 204);
> $tealpen = ImageColorAllocate($theimage, 0, 153, 153);
> $limepen = ImageColorAllocate($theimage, 0, 255, 0);
> $navypen = ImageColorAllocate($theimage, 0, 0, 153);
> $purplepen = ImageColorAllocate($theimage, 153, 0, 153);
> $maroonpen = ImageColorAllocate($theimage, 153, 0, 0);
> $olivepen = ImageColorAllocate($theimage, 153, 153, 0);
> }
> $servername = getenv("SERVER_NAME");
>
> // set the content type
> header("Content-type: image/png");
>
> $imageWidth = 118;
> $imageHeight = 136;
>
> // create image
> $image = imageCreate($imageWidth, $imageHeight);
>
> $bgcolor = ImageColorAllocate($image, 0, 0, 0);
> $fgcolor = ImageColorAllocate($image, 255, 255, 255);
> setPenColors($image);
>
> srand ((double) microtime() * 1000000);
> $rndnum = rand(10,60);
> $oldx = rand(1,$imageWidth-2);
> $oldy = rand(1,$imageHeight-18);
> $pencolor = array
($redpen,$greenpen,$bluepen,blackpen,$whitepen,$yellowpen,$aquapen,$fuschiap
en,$greypen,$silverpen,$tealpen,$limepen,$navypen,$purplepen,$maroonpen,$oli
vepen);
>
> $rndpen = rand(0,15);
> ImageRectangle($image, 0, 0, $imageWidth-1, $imageHeight-17,
$pencolor[$rndpen]);
>
> for ($i=0; $i<$rndnum; $i++) {
> $rndpen = rand(0,15);
> $newx = rand(1,$imageWidth-2);
> $newy = rand(1,$imageHeight-18);
> ImageLine ($image, $oldx, $oldy, $newx, $newy, $pencolor[$rndpen]);
> $oldx = $newx;
> $oldy = $newy;
> }
>
> ImageString($image,2, 4, $imageHeight-14, "Random Image Maker",
$limepen);
>
> // create an interlaced image for better loading in the browser
> imageInterlace($image, 1);
>
> // mark background color as being transparent
> imageColorTransparent($image, $bgcolor);
>
> // now send the picture to the client (this outputs all image data
directly)
> imagePNG($image);
>
>
> ?>
>
----------------------------------------------------------------------------
----
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---