Looking to fix script below. Can pay via paypal $50 for correct working script. $limit variable must be set to each individual timezone of people coming to site. Script cannot be passed to another page or through a form. User must go to page and immediately get result on same page. (hope that made sense).
$location = "localhost";
$username = "";
$password = "";
$database = "";
$limit = date("Y-m-d");
// This is var in question
// Must be specific to timezone of each user
$conn = mysql_connect("$location","$username","$password");
if (!$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
$result=mysql_query("SELECT * FROM guest, guestc WHERE guestDate = ('".addslashes($limit)."') AND guestShow = guestcShow AND guestcShow = guestShow ORDER BY guestcID") or die ("No results found.");
if (mysql_num_rows($result)<1){
echo "Error";
} else {
$num = mysql_num_rows($result);
$cur = 1;
echo "";
while ($num >= $cur) {
$row = mysql_fetch_array($result);
$show = $row["guestShow"];
$name = $row["guestcName"];
$air = $row["guestAir"];
$artist = $row["guestArtist"];
echo "<a href=\"guest/index.php#$show\">$name</a><br><img src=\"img/spacer.gif\" width=\"1\" height=\"3\" border=\"0\" alt=\"\"><br>".date("m/d",strtotime($air))."<br>$artist<br><img src=\"img/spacer.gif\" width=\"1\" height=\"10\" border=\"0\" alt=\"\"><br>";
$cur++;
$row_count++;
}
echo "";
}
mysql_close($conn);