Hey guys.. for come reason my data is outputted twise shown in the image below and i cant figure out why.
Code: [Select]<html>
<head>
<title>Month Summary</title>
<!-- change styles if you want -->
<style type="text/css">
p {font-family: georgia, verdana, sans-serif; font-size: 13px; color: #333333; }
h1 {font-family: georgia, verdana, sans-serif; font-size: 16px; color: #26618e; }
body {background-color: #fcfcfc;}
</style>
</head>
<body>
<br/>
<?php
// THERE IS NO NEED TO EDIT BELOW HERE
$mon = $_GET['mon']; // month from clicked month name
$month = intval($mon); // var to use with month name array
if (strlen($mon)==1) { $mon = "0". $mon; }
$yr = $_GET['yr']; // year from clicked month name
include("cal_parms.php");
include("./lang/dat_nam_en.php"); // load default language file so as not to mess anything upp with new text.
include($dat_names); // retrieved from cal_parms.php as a 'language' file
include("cal_db_conn.php");
mysql_connect($db_host, $db_login, $db_pass) or die ("Can't connect!");
mysql_select_db($db_name) or die ("Can't open database!");
$min_dat = $yr. "-". $mon. "-01";
$max_dat = $yr. "-". $mon. "-31"; //sloppy but effective
// retrieve all events for the month
$query = "SELECT * from $db_table WHERE (ev_dat>='$min_dat') AND (ev_dat<='$max_dat') ORDER by ev_dat";
$result = @mysql_db_query($db_name, $query);
echo "<table width='480' cellpadding='3' cellspacing='3' align='center' style='border: thin dotted #999999;' bgcolor='#f7f7f7'><tr><td>";
while ($myrow = mysql_fetch_array($result)) // loop through all results
{
$found = $myrow['ev_dat'];
$pieces = explode("-", $found);
$monum = intval($pieces[1]);
$danum = intval($pieces[2]);
echo "<h1>". $danum. " ". $mo[$month]. ", ". $yr. "</h1>";
echo "<p><strong>". $EventText. ": ". $myrow['ev_title']. "</strong><br/>";
echo $LocationText. ": ". $myrow['ev_locn']. "<br/>";
echo $DetailsText. "<br/>". nl2br($myrow['ev_desc']). "</p>";
$i++;
}
if ($i==0) { echo "<h1>".$noEventsText." ". $mo[$month]. "</h1>"; }
if ($sho == "1") {
echo "<p align='right'><a href='javascript:self.close()'>".$closewindowText ."</a>";
}
else {
echo "<p align='right'>« <a href='javascript:history.go(-1)'>".$backToCalendar."</a></p>";
}
?>
</td></tr></table>
</html>
</body>
hopefully someone can see the reason why
Thanks
Need a fuction to count entries in a field
HiI need a fuction to count how many times a email address is entered in to a field.I making a for wordpress that counts how many timesa user has made comments.Thanks
RSS feed - FeedList for WordPress
Hi,I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of an item and have it open in a new window to display the full item. I don't want it to go to the host
User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out by myself.Im developing a web based reporting application, based upon PHP/MySQL. At some point the
Function
How can I make this function that once you click the link in the code it takes you to a new page without html but so the menu_name and content load in it.Code: function public_navigation($sel_subject
Login script (probably a simple error)
dbConfig.phpCode: <?// Replace the variable values below// with your specific database information.$host = "localhost";$user = "username";$pass = "password";$db
Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if there was a reasonable way to bring back the results every second.For example, I want a web based
Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so I don't quite understand what they're talking about or what the code means.Here's the situation: I
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a new user when I'm not logged in. It should redirect me back to the login page but I get this
Multiple PHP errors when clicking a link..and..removing a ghost..
Hi - I have 2 problems with a new website - homeswapvacations.com, which I need help solving.The first problem - In the left column (on all pages) is "Featured Listing" column (in the admin
How to copy a part of a vector in a raw memory
Hi,