You are here: Checkbox not between date « PHP Programming Language « IT news, forums, messages
Checkbox not between date

Posted by elia on 04/18/06 10:45

Hello,

I get a database for « News » on Internet.
Side Admin, I would like a form to know witch "News" are Online or
not.


In my database mysql I get :

Date_start
and
Date_end

Outside this date, the « News » are unvisible.


In my form I put a checkbox « Off_line »

If it's check, all the news outside Date_start
And Date_end must be visible.


I tryed like this

In Head :
<?php
if (isset($HTTP_GET_VARS["date_off"]))
{
$ date_off =$HTTP_GET_VARS["date_off"];
}
else
{
$ date_off =0;
}
?>

In my form for checkbox :
<input <?php if ("CURRENT_DATE NOT BETWEEN $row_R_news['date_start']
AND $row_R_news['date_end'] ",1) {echo "checked=\"checked\"";} ?>
name=" date_off " type="checkbox" id=" date_off " value="1">


For my request sql :
SELECT t_news.*
FROM t_news
WHERE $date_off

Thanks to help me, pascal

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация