PHP, Grabbing Mysql Data

A users will post Form Data, sending to the server the Year and Number to query a MySql database with.
I am also showing here how to pick the correct table based on the user input of the Year. So depending on the Year chosen by the user, it will use the database appropriate to that year.
When the rows of data are returned we are also going to give each row and alternating color
These are the 2 colors being used,
$rowColors = Array(‘#BDBDBD’,’WHITE’); $i= 0;
and this colors the rows
echo ‘
echo “
Activity for the Year.”;
echo ”
“; echo “Year”;
echo “Number”;?>
?> $year = $row[‘year’];
$number = $row[‘number’];print <‘table’>;print ‘
‘;print ‘
print ‘
print ”;}print <‘/table’>;?>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s