- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
13 Posted Topics
Have you tried the «SELECT DISTINCT» Statement ? [CODE]$query = "SELECT DISTINCT event_date, event_name FROM events WHERE event_date >'$startdate' AND event_date <'$enddate' order by event_date"; [/CODE] [url]http://www.w3schools.com/SQl/sql_distinct.asp[/url]
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 [URL="http://ca2.php.net/strtotime"]strtotime[/URL]
Add cellspadding=0 on line 9... [CODE]<table border="0" cellspacing="0" cellpadding="0">[/CODE]
A simple way to develop a multilanguage script is to define every text as a variable... Example: [CODE]echo "title"; echo "text"; echo "comments";[/CODE] Should be replaced by: [CODE]include 'en.php'; // or fr.php, de.php, etc... echo $msg[0]; echo $msg[1]; echo $msg[2];[/CODE] Create a en.php where the variables are defined as... [CODE]$msg[0] = …
[QUOTE=almostbob;823039][code=php] <?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> [/code][/QUOTE] To …
With the following code, you will get English date format like «Tuesday February 10, 2009 - 13:08:09» [ICODE]<?php setlocale(LC_TIME, "C"); echo ucfirst(strftime("%A %B %e, %Y %t - %X")); ?>[/ICODE] With the following code, you will get French date format like «Mardi le 10 février 2009 - 13:08:09» [ICODE]<?php setlocale(LC_TIME, "fr_FR"); …
Very simple, few files and works fine (with database). [url]http://www.maaking.com/index.php?loadpage=tutorials[/url] This other one works fine too but without database. [url]http://www.planetluc.com/en/scripts_mynews.php[/url]
For a PopUp without a submit button and instant redirection, you should try something like: [ICODE] <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> [/ICODE] If you want a listbox without a submit button and instant redirection: [ICODE] <form name="listboxnav"> <select …
If the "feed" folder is on the first level of your site ([url]www.yoursite.com/feed/[/url]...) and the deeper folder is on 5 levels, you should try this: [ICODE]$filename_path = '../../../../../feeds/vstudio_'.$_COOKIE['lang'].'.xml';[/ICODE] If the "feed" folder is not on the first level of your site ([url]www.yoursite.com/anotherfolder/feed/[/url]...) and the deeper folder is on 3 levels, …
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 [ICODE] // courses & subcourse values are mandatory as programmed with: $course=$_GET['course'] $subcourse= $_GET['subcourse']; [/ICODE]
You probably need to read this: [url]http://www.w3schools.com/Sql/sql_join.asp[/url]
Maybe you should try something like this; [code=php] $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] …
No php tags on this line... [code]<img src=$content width="200" height="170"/>[/code] You should try this: [code]<img src="<?php echo $content; ?>" width="200" height="170"/>[/code]
The End.
NormandP