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

Posted by Jerry Stuckle on 11/02/83 11:45

elia wrote:
> 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
>

First of all, what do actually get on your page? Next, have you looked at the
generated source?

One possibility I see is:

{echo "checked=\"checked\"";} ?>
name="

Looks like you don't have any space before name= if the box is checked.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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