Jump to content

Textfield help


pbalsamo

Recommended Posts

Cant someone help with code below on how I can put 2 dates in two textfields with code below. the fields are named Datefrom and Dateto

thanks

 

 

 

<?php

$country=$_REQUEST['SelectDate'];

switch($country)

{

case "1" :

Datefrom textfield = Datefrom;

Dateto; textfield = Dateto;

break;

case "2" :

Datefrom textfield = Datefrom;

Dateto; textfield = Dateto;

break;

 

}

?>

 

<form action="" name="form3" id="form3">

<select name="SelectDate" id="SelectDate" onchange="">

<option value="1">Current Year</option>

<option value="2">Current Year-to-date</option>

<option value="3">Yesterday</option>

<option value="4">Last Week</option>

<option value="5">Last Week-to-date</option>

<option value="6">Last Month</option>

<option value="7">Last Month-to-date</option>

<option value="8">Last Year</option>

<option value="9">Last Year-to-date</option>

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

<option value="11">Current Month</option>

<option value="12">Current Quarter</option>

<option value="13">Current Quarter-to-date</option>

<option value="14">All Dates</option>

</select>

from

<input name="Datefrom" type="text" id="Datefrom" value="<?php echo date("Y-01-01"); ?>" size="10" />

to

<input name="Dateto" type="text" id="Dateto" value="<?php echo date("Y-12-31"); ?>" size="10" />

 

<input name="Datenow" type="hidden" id="Datenow" value="<?php echo date("Y-m-d"); ?>" size="10"/>

<input type="submit" name="button2" id="button2" value="New date" />

</form>

Link to comment
https://forums.phpfreaks.com/topic/127250-textfield-help/
Share on other sites

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.