Jump to content

sql statement, problems with select a particular month..anyone..???


nizmy

Recommended Posts

hye everyone..

i want to select a particular month, then display the details in the table...but i got  problems with that..can anyone help..??

 

------------------------------------------------------

the coding looks like this..

 

 

<select name="month_no">

      <option value="01">January</option>

      <option value="02">February</option>

      <option value="03">March</option>

      <option value="04">April</option>

      <option value="05">May</option>

      <option value="06">June</option>

      <option value="07">July</option>

      <option value="08">August</option>

      <option value="09">September</option>

      <option value="10">October</option>

      <option value="11">November</option>

      <option value="12">December</option>

    </select>

 

how do i select the particular month, then display it..??

i using session to got the "month_no"

 

$month_no=$_SESSION[month_no];

 

 

ex: if i choose december, which is 12, it will display the details of the payment in the that month...

 

all the details about payment  in the  payment_trans table

 

 

thnx in advance

 

how do i select the particular month, then display it..??

i using session to got the "month_no"

 

$month_no=$_SESSION[month_no];

 

Let me get this right you want to actually display the word from the corresponding number?  Then use this:

 

echo "Month '$i' is: " . date( "F" , mktime( 0 , 0 , 0 , $month_no ) );

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.