|
Posted by Jerry Stuckle on 10/11/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]
|