NormandP 1 Newbie Poster

Maybe something like this ?

<?php
$query = "SELECT DISTINCT event_date FROM events WHERE event_date='$todaysdate'";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
	echo "<b>". $row['event_date'] . "</b><br />";
	
		$query2 = "SELECT event_name FROM events WHERE event_date='$todaysdate'";
		$result2 = mysql_query($query2);
		while($row2 = mysql_fetch_assoc($result2))
			{
				echo $row2['event_name'] . "<br />";
			}
echo "<br />";
}
?>
NormandP 1 Newbie Poster

Have you tried the «SELECT DISTINCT» Statement ?

$query  = "SELECT DISTINCT event_date, event_name FROM events WHERE event_date >'$startdate' AND event_date <'$enddate' order by event_date";

http://www.w3schools.com/SQl/sql_distinct.asp

NormandP 1 Newbie Poster

Add cellspadding=0 on line 9...

<table border="0" cellspacing="0" cellpadding="0">
NormandP 1 Newbie Poster

A simple way to develop a multilanguage script is to define every text as a variable...
Example:

echo "title";
echo "text";
echo "comments";

Should be replaced by:

include 'en.php'; // or fr.php, de.php, etc...
echo $msg[0];
echo $msg[1];
echo $msg[2];

Create a en.php where the variables are defined as...

$msg[0] = "title";
$msg[1] = "text";
$msg[2] = "comments";

Create a fr.php (french) where the variables are defined as...

$msg[0] = "titre";
$msg[1] = "texte";
$msg[2] = "commentaires";

etc...
Consider the option to put the language choice in a config.php file...

NormandP 1 Newbie Poster
<?php
/* form processing, captcha generate etc */ 
?>
<form action='<?php echo $_server['php_self']; ?>' method='post'><br>
bog: <input type='text' name='bog' value="<?php if(isset($_post['bog'] { echo $_post['bog']; } ?>"><br>
big: <input type='text' name='big' value="<?php if(isset($_post['big'] { echo $_post['big']; } ?>"><br>
<input type='text' name='captcha'><br>
<input type='submit' onclick='return(confirm("Are you sure?"));' value='Submit'>
</form>

To almostbob...
Two closing RIGHT PARENTHESIS are missing in your code

<?php if(isset($_post['bog'])) { echo $_post['bog']; } ?>
<?php if(isset($_post['big'])) { echo $_post['big']; } ?>
NormandP 1 Newbie Poster

2009-03-05 is a better way to store textual datetime than 2009-3-5... and will probably sort correctly !

I agree with almostbob : Consider to convert your textual datetime description into a timestamp with strtotime

NormandP 1 Newbie Poster

Very simple, few files and works fine (with database).
http://www.maaking.com/index.php?loadpage=tutorials

This other one works fine too but without database.
http://www.planetluc.com/en/scripts_mynews.php

NormandP 1 Newbie Poster

All the documentation about what you can display is there:
http://www.php.net/strftime

NormandP 1 Newbie Poster

Try charset=iso-8859-1 for french usage or some other language

NormandP 1 Newbie Poster

Which charset (page encoding) are you using ?

NormandP 1 Newbie Poster

I just tried tr_TR (Turkish) and I obtained : Salý 10 Þubat 2009 - 19:22:56

I do not speak this language but I assume it's OK...

Your page encoding (UTF-8, iso-8859-1, etc...) may affect the presentation of exotic characters.

NormandP 1 Newbie Poster

If you just want to include something like
«Tuesday February 10, 2009 - 15:31:11»
you don't need no more your previous function
(function formatDate...)".

I suppose you know that your page extension need to be .php (not .html).

Simply paste the code between the html tags, like...

<html>
   <head>
      <title>Your Page Title</title>
   </head>

<body>
      <p>
            <?php
               setlocale(LC_TIME, "C");
               echo ucfirst(strftime("%A %B %e, %Y %t - %X"));
            ?>
      </p>
</body>
</html>
NormandP 1 Newbie Poster

this what exacly i need, where do i add this code to?

<?php
setlocale(LC_TIME, "C");
echo ucfirst(strftime("%A %B %e, %Y %t - %X"));
?>

thank you

??? I don't understand your question ?
It will appear everywhere you add the code !

About Language complete list:
I believe that the language variable refer to «ISO 639-1 Code» convention...
http://www.loc.gov/standards/iso639-2/php/code_list.php

serdas commented: thank you +1
NormandP 1 Newbie Poster

With the following code, you will get English date format like
«Tuesday February 10, 2009 - 13:08:09»

<?php
setlocale(LC_TIME, "C");
echo ucfirst(strftime("%A %B %e, %Y %t - %X"));
?>

With the following code, you will get French date format like
«Mardi le 10 février 2009 - 13:08:09»

<?php
setlocale(LC_TIME, "fr_FR");
echo ucfirst(strftime("%A le %e %B %Y %t - %X"));
?>

Remove « - %X» on third line if you don't want «h:m:s»

C = English
fr_FR = French
fi_FI = Finnish
de_DE = German
es_ES = Spanish
pt_PT' = Portuguese
etc...

Maybe someone can give us a link to the complete list... I didn't found it !

NormandP 1 Newbie Poster

For a PopUp without a submit button and instant redirection, you should try something like:

<form name="popupnav"> 
   <select name="link" onChange="location=document.popupnav.link.options 
[document.popupnav.link.selectedIndex].value;" value="GO"> 
   <option selected>Choose</option> 
   <option value="http://www.msn.com">MSN</option>
   <option value="http://www.yahoo.com">Yahoo</option>
   <option value="http://www.google.com">Google</option> 
   </select> 
   </form>

If you want a listbox without a submit button and instant redirection:

<form name="listboxnav"> 
   <select name="link" size="3" multiple="multiple" onChange="location=document.listboxnav.link.options 
[document.listboxnav.link.selectedIndex].value;" value="GO"> 
   <option value="http://www.msn.com">MSN</option>
   <option value="http://www.yahoo.com">Yahoo</option>
   <option value="http://www.google.com">Google</option> 
   </select> 
   </form>

"size=3" is relative to the number of items in the ListBox... need to be adjusted

NormandP 1 Newbie Poster

If the "feed" folder is on the first level of your site (www.yoursite.com/feed/...)
and the deeper folder is on 5 levels, you should try this: $filename_path = '../../../../../feeds/vstudio_'.$_COOKIE['lang'].'.xml'; If the "feed" folder is not on the first level of your site (www.yoursite.com/anotherfolder/feed/...)
and the deeper folder is on 3 levels, you should try this: $filename_path = '../../../anotherfolder/feeds/vstudio_'.$_COOKIE['lang'].'.xml'; If you have too much "../", it will works anyway because it will stop at the root... $filename_path = '../../../../../../../../../anotherfolder/feeds/vstudio_'.$_COOKIE['lang'].'.xml'; I often use this method (php files, images, .pdf, etc...) and the links on multiple locations and any levels works fine.

NormandP 1 Newbie Poster

When you go to "courses.php" for the FIRST TIME, do you have a query after the .php ?

Something like:
.../courses.php?course=course_name&subcourse=something

// courses & subcourse values are mandatory as programmed with:
$course=$_GET['course']
$subcourse= $_GET['subcourse'];
NormandP 1 Newbie Poster

Not absolutely sure...

If the 2 databases are located on the same server (same "username", "password" and "localhost")...

I think you should try something like this:

$query="SELECT
first_database_name . first_table_name . optional_column_name ,
second_database_name . second_table_name . optional_column_name

FROM
first_database_name . first_table_name . optional_column_name

INNER JOIN
second_database_name . second_table_name . optional_column_name

etc...

NormandP 1 Newbie Poster

You probably need to read this:
http://www.w3schools.com/Sql/sql_join.asp

NormandP 1 Newbie Poster

No php tags on this line...

<img src=$content width="200" height="170"/>

You should try this:

<img src="<?php echo $content; ?>" width="200" height="170"/>
NormandP 1 Newbie Poster

Maybe you should try something like this;

$query = "SELECT DISTINCT highschool FROM students ORDER BY highschool";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result))
{
echo "<table border='1'>";
	echo "<tr>";
	echo "<th align='left' width='450'>" . $row['highschool'] . "</th>";
	echo "</tr>";
		$query2 = "SELECT * FROM students WHERE highschool = $row[highschool] ORDER BY lastname";
		$result2 = mysql_query($query2);
		while($row2 = mysql_fetch_assoc($result2))
			{
				echo "<tr>";
				echo "<td width='450'>" . $row2['lastname'] . ", " . $row2['firstname'] . "</td>";
				echo "</tr>";
			}
echo "</table>";
echo "<br />";
}