pass a variable

R

rob

Guest
Hi,

I'm tring to pass 1 variable from a small form in the footer_index.php to that link.

Basiscally I'm doing this:
select * from `table` where month(odate) = 1 order by `odate` ASC limit 0 , 10


I'm unable to get it to pass... Help:

<form method="post" action="result.php?&table_name=evet1&function=search&sql=+where+month%28odate%29+%3D+<? $month; ?>&name_mailing=&page=&order=odate">

Month:
<input type="text" name="month" >
<input type="submit" value="Submit">
</form>

It works create if I type the month 1,2,3 right into the link where $month is. But I'm wanting this to be able to be inputed from the form and click submit a little more user friendly...

I Will provide summary..
This will generate a list of records that where created for the month specified... My odate is a datetime, "dadabik Field type = insert_date".

thanks
rob
 
E

Eugenio

Guest
rob wrote:

> Hi,
>
> I'm tring to pass 1 variable from a small form in the
> footer_index.php to that link.
>
> Basiscally I'm doing this:
> select * from `table` where month(odate) = 1 order by `odate`
> ASC limit 0 , 10
>
>
> I'm unable to get it to pass... Help:
>
> <form method="post"
> action="result.php?&table_name=evet1&function=search&sql=+where+month%28odate%29+%3D+<?
> $month; ?>&name_mailing=&page=&order=odate">
>
> Month:
> <input type="text" name="month" >
> <input type="submit" value="Submit">
> </form>

[....]

It's because when you fill the month field the echo $mont has been already executed....try with javascript.



(Latest version of DaDaBIK when this message was posted: 2.2.1)
 
Top