Jump to content

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


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 ) );

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.