Hello
I am trying to highlight the days on my calendar based on the dates that i have in my database. Currently I can only get it to display the last element in the database which leads me to believe that i have an error in my arrays
Code:
<?php
## My database
$query = mysql_query("SELECT * FROM speaking_engagements");
while($result = mysql_fetch_array($query)){
$dates = $result['date'];
$dates = explode('-',$dates);
$dates = $dates[2];
}
#$dates = explode('-',$dates);
#$dates = $dates[2];
#$numdays = count($dates);
$time = time();
$today = date('j',$time);
$days = array(
$today=>array(NULL,NULL,'<span style="color: red; font-weight: bold; font-size: larger;">'.$today.'</span>'),
$dates=>array('#'),
8=>array('#'), ## a hard coded one that works
);
$today = getdate();
$year = $today['year'];
$month = $today['mon'];
echo '<div id="calendar">';
echo generate_calendar($year, $month, $days, 3, NULL, '/weblog/archive/2004/Jan');
echo '</div>';
?>
why isn't this PHP code working ???
it's suppose to find a name on the database. <?php $s = $_POST["lname"]; $x = trim($s); $exists = false; $selectedRow = 0; mysql_connect (localhost,testuser,testuser);
Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 separate if statements in the same php document. What I've done is this:Code: if ($p1=='on' AND
Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to an email but in testing i am having trouble getting the checkbox data to display in the email it
Help with PHP Email Script
Hi guys,I'm a newbie to php and need help with the script below:At the moment when I receive the automated email of data, I'm not receiving any information with the form field names I receive blank
user validation always displaying invalid ? please help
Hello,I have 2 accounts and there is a field in mysql called validated it can be either "true" or "false"I tried writing a code so when the user logs in if the user is validated
php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following.Have a php file log into a email account and saves the emails as text files in a directory then
Big Problem!! Please help
Hi Guys,Im making a website for a friend have encountered a really annoying problem. When every i run the script below i get this error: "Parse error: syntax error, unexpected '}' in
Get Total From While Loop
I'm trying to get the total for each product and add them for a Grand Total to list outside the loop or only echo once I can do the addition but it will echo 5 time in the loop.How would I go about
Users and Groups with PHP Classes
Hi,I have setup what I hope to be a good working User class. Now I want to introduce group membership and group permissions. Before doing so, I have a couple of questions.Firstly, because users and
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