Wow, I feel like such an idiot...when I was messing with the field types earlier, I neglected to realize that all my date entries changed to 0000-00-00. :quiet:
On a great note, I'm finally getting results. It prints everything almost as I want it, so I'd like to ask a question, if I may.
The format of the print out (with radio buttons on the left of each entry, respectively):
08/23/2008, Comfort Inn and Suites, 123 Main St.
08/23/2008, Somewhere Else, 123 Someplace Dr.
09/06/2008, Comfort Inn and Suites, 123 Main St.
09/06/2008, Somewhere Else, 123 Someplace Dr.
How would I go about formatting this to make it look like this:
http://www.traininginstructorsinc.com/test/location/preview.html
Here's the PHP code if you need it.
<?php
$con = mysql_connect("localhost","username","password");
if(!$con)
{
die ('Could not connect to database: ' . mysql_error());
}
$db_selected = mysql_select_db("trainio8_Georgia", $con);
if (!$db_selected)
{
die ("Can\'t use db1 : " . mysql_error());
}
$future_date = $_REQUEST["date18"];
$zdate = strtotime($future_date);
$xdate = $zdate - (7 * 24 * 60 * 60);
$ydate = date('Y-m-d', $xdate);
$sql = "SELECT DATE_FORMAT(date, '%m/%d/%Y') AS date,location, address FROM `Warner Robins` WHERE `date` >= '" . $ydate . "' ORDER BY date ASC, location ASC";
$result = mysql_query($sql);
if ( mysql_num_rows( $result ) > 0 )
{
while( $data = mysql_fetch_assoc($result))
{
echo "<input type='radio' id='location' value='".$data['date'].",".$data['location'].",".$data['address']."' /> ".$data['date'].", <strong>".$data['location']."</strong>, ".$data['address']."<br />";
}
}
else
{
echo "No locations available.";
}
mysql_close($con);
?>
That's the last thing, I swear. 😃