Help: Can you make this .php less than 1 month??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Novice Computer User

    Help: Can you make this .php less than 1 month??

    Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a
    total novice and can't seem to figure it out. Here is a .php script.
    Right now, the
    minimum amount of time (i.e. duration) allowed is 1 month. However, I
    want to be able to reduce the minimum amount of time to 1 day (i.e.
    24 hours) -- basically a 24 hour trial period.


    Can somebody PLEASE PLEASE tell me what I need to change in this file
    to do this? Here is a copy - thanks enormously in advance:


    <html>
    <head>
    <title>Admin Panel</title>


    <script language=JavaSc ript
    src="../templates/javascript.js"
    type="text/javascript"></script>
    <link href="../templates/styles.css" rel="stylesheet "
    type="text/css">


    <style>
    body {background-color:white;
    font-family:verdana; font-size:11}
    td {font-family:verdana; font-size:11}


    input, select, textarea {border-width:1;
    border-color:black;fon t-family:verdana; font-size:11}


    .sub {background-color:#336699;
    font-family:verdana; color:white;
    font-size:11; font-weight:bold; border-width:1; border-color:black}


    .TableHead {background-color:#336699;
    font-family:verdana;
    color:white; font-size:11; font-weight:bold;}


    .RedLink {font-family:verdana; color:red;
    font-size:11;
    font-weight:bold; text-decoration:none }
    a.RedLink:hover {text-decoration:unde rline}


    a.GreenLink {font-family:verdana; color:green;
    font-size:11;
    font-weight:bold; text-decoration:none }
    a.GreenLink:hov er {text-decoration:unde rline}


    a.BlackLink {font-family:verdana; color:black;
    font-size:11;
    font-weight:bold; text-decoration:none }
    a.BlackLink:hov er {text-decoration:unde rline}


    a.BlueLink {font-family:verdana; color:blue;
    font-size:11;
    font-weight:bold; text-decoration:none }
    a.BlueLink:hove r {text-decoration:unde rline}


    </style>


    <script>


    function CheckProfile() {


    if(document.Reg Form.p1.value== "")
    {
    window.alert('E nter your password,
    please!');
    document.RegFor m.p1.focus();
    return false;
    }


    if(document.Reg Form.p2.value== "")
    {
    window.alert('C onfirm your password,
    please!');
    document.RegFor m.p2.focus();
    return false;
    }


    if(document.Reg Form.p1.value != "" &&
    document.RegFor m.p2.value !=
    "" && document.RegFor m.p1.value != document.RegFor m.p2.value)
    {
    window.alert('E nter and confirm your
    password again!');
    document.RegFor m.p1.value="";
    document.RegFor m.p2.value="";
    document.RegFor m.p1.focus();
    return false;
    }


    if(document.Reg Form.FirstName. value=="")
    {
    window.alert('E nter your First Name,
    please!');
    document.RegFor m.FirstName.foc us();
    return false;
    }


    if(document.Reg Form.LastName.v alue=="")
    {
    window.alert('E nter your Last Name,
    please!');
    document.RegFor m.LastName.focu s();
    return false;
    }


    if(document.Reg Form.address.va lue=="")
    {
    alert('Enter your address, please!');
    document.RegFor m.address.focus ();
    return false;
    }


    if(document.Reg Form.city.value =="")
    {
    alert('Enter your city, please!');
    document.RegFor m.city.focus();
    return false;
    }


    if(document.Reg Form.state.valu e=="")
    {
    alert('Enter your state, please!');
    document.RegFor m.state.focus() ;
    return false;
    }


    if(document.Reg Form.country.va lue=="")
    {
    alert('Select your country, please!');
    document.RegFor m.country.focus ();
    return false;
    }


    if(document.Reg Form.phone.valu e=="")
    {
    window.alert('E nter your Phone,
    please!');
    document.RegFor m.phone.focus() ;
    return false;
    }



    if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3 })+$/.test(document. RegForm.emĀ­ail. value))

    {
    return true;
    }


    alert("Invalid E-mail Address! Please
    re-enter.");
    document.RegFor m.email.focus() ;
    return false;


    }


    </script>


    </head>


    <body>
    <script>
    function CheckNewPrice() {


    if(document.f1. PackageName.val ue=="")
    {
    window.alert('E nter the new package name,
    please!');
    document.f1.Pac kageName.focus( );
    return false;
    }


    if(document.f1. NewPrice.value= ="")
    {
    window.alert('E nter the new price value,
    please!');
    document.f1.New Price.focus();
    return false;
    }


    if(document.f1. nDuration.value =="")
    {
    window.alert('S elect a duration period,
    please!');
    document.f1.nDu ration.focus();
    return false;
    }


    if(document.f1. pLevel.value==" ")
    {
    window.alert('S elect a priority level,
    please!');
    document.f1.pLe vel.focus();
    return false;
    }


    }


    function CheckDelete() {


    if(confirm('Are you sure you want to delete this
    price?'))
    {
    return true;
    }
    else
    {
    return false;
    }


    }


    </script>


    <form method=post name=f1 onsubmit="retur n CheckNewPrice() ">


    <table align=center>
    <tr>
    <td colspan=2 align=center class=TableHead >Enter a new
    price</td>
    </tr>


    <tr>
    <td>Package name:</td>
    <td><input type=text name=PackageNam e maxlength=50></td>
    </tr>


    <tr>
    <td>Price:</td>
    <td><input type=text name=NewPrice size=6 maxlength=6></td>
    </tr>


    <tr>
    <td>Duration: </td>
    <td>
    <select name=nDuration>
    <option value=""></option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option value="9">9</option>
    <option value="10">10</option>
    <option value="11">11</option>
    <option value="12">12</option>
    </select> months
    </td>
    </tr>


    <tr>
    <td>Priority Level:</td>
    <td>
    <select name="pLevel">
    <option value=""></option>
    <option value="1">1 - Standart</option>
    <option value="2">2 - Bronze</option>
    <option value="3">3 - Platinium</option>
    <option value="4">4 - Gold</option>
    <option value="5">5 - Premium</option>
    </select>
    </td>
    </tr>


    <tr>
    <td> </td>
    <td><input type=submit name=s1 value=Save class=sub></td>
    </tr>


    </table>


    </form>


    <table align=center width=650 cellspacing=0 bordercolor=bla ck
    frame=below>
    <tr>
    <td class=TableHead width=200>Packa ge Name</td>
    <td class=TableHead >Priority Level</td>
    <td class=TableHead align=center>Du ration</td>
    <td class=TableHead align=right>Pri ce</td>
    <td class=TableHead align=center>Ac tion</td>


    <tr>
    <td>0</td>
    <td>Premium</td>
    <td align=center>1 month</td>
    <td align=right>$ 0.00</td>
    <td align=center><a class=GreenLink
    href="PriceEdit .php?PriceID=4" >edit</a> | <a class=RedLink
    href="PriceDele te.php?PriceID= 4" onclick="return
    CheckDelete();" >delete</a></td>
    </tr>


    <tr>
    <td>Shake Up</td>
    <td>Gold</td>
    <td align=center>2 months</td>
    <td align=right>$ 34.95</td>
    <td align=center><a class=GreenLink
    href="PriceEdit .php?PriceID=6" >edit</a> | <a class=RedLink
    href="PriceDele te.php?PriceID= 6" onclick="return
    CheckDelete();" >delete</a></td>
    </tr>


    <tr>
    <td>Grow Up</td>
    <td>Platinium </td>
    <td align=center>1 month</td>
    <td align=right>$ 25.00</td>
    <td align=center><a class=GreenLink
    href="PriceEdit .php?PriceID=5" >edit</a> | <a class=RedLink
    href="PriceDele te.php?PriceID= 5" onclick="return
    CheckDelete();" >delete</a></td>
    </tr>


    </table>


    <br><br>

    PS: Here are the locations of the 2 .php files that I think you may
    need to look at:



    If you could solve this for me, I'd VERY much appreciate it. Thanks in
    advance for your time.

  • Novice Computer User

    #2
    Re: Help: Can you make this .php less than 1 month??

    First and foremost, thank you ENORMOUSLY for taking the time/trouble of
    responding to my question. Unfortunately, I am a total novice and even
    after looking at your solution, I unfortunately have no idea where the
    heck it goes. Um, I hate to ask, but is there any way possible for you
    to copy/insert that line in the appropriate place:

    $days=1; $endtime = time() + $days * 24 * 3600;

    I am not sure where exactly it goes.. and it seems like even after I
    insert it, I'm likely going to need to add something else somewhere to
    enable me the ability to select the 24 hour period instead of the 1 -
    12 month options. For your convenience, here are the links to the 2
    ..php files that I THINK may have to be modified. Again, I really can't
    thank you enough.. and if you decide not to respond, honestly... thanks
    again for your time... I'm certainly going to forward your answer to
    somebody (once I find them) who can insert this 'stuff' in the right
    place..

    Here are the locations of the 2 .php files that I think you may
    need to look at:



    Very best regards & happy holidays.

    :)

    Comment

    • Novice Computer User

      #3
      Re: Help: Can you make this .php less than 1 month??

      PS: Here is my email incase it is easier to communicate and/or
      possibly send me the modified .php file: puzzele@NOSPAMa tt.net

      Remove "NOSPAM" from the email.

      Comment

      • Novice Computer User

        #4
        Re: Help: Can you make this .php less than 1 month??

        I also looked at the .php files noted above.. it does tell you how much
        time is left before it is going to expire.. so I know the .php file
        will automatically expire.. my problem is, I want it to be able to
        offer a free trial for 24 days (instead of 1 month).. once that is
        done, I believe it will expire automatically.. .

        The easiest way to see the whole script/site I'm working on is at:


        Feel free to make up/register anything you want to see how it works..
        once you register, you can select the free 1 month trial (which I want
        modified to 24 hours). Thanks again for ANY help.

        Comment

        • Tim Roberts

          #5
          Re: Help: Can you make this .php less than 1 month??

          "Novice Computer User" <attorneyatlaw@ hotmail.com> wrote:[color=blue]
          >
          >Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a
          >total novice and can't seem to figure it out. Here is a .php script.
          >Right now, the
          >minimum amount of time (i.e. duration) allowed is 1 month. However, I
          >want to be able to reduce the minimum amount of time to 1 day (i.e.
          >24 hours) -- basically a 24 hour trial period.
          >
          >Can somebody PLEASE PLEASE tell me what I need to change in this file
          >to do this?[/color]

          Nothing. The page you posted is not enforcing the time limitation. That's
          being done in some other file. You could certainly change the wording here
          to refer to days instead of months, but the enforcement is happening
          elsewhere.
          [color=blue]
          >PS: Here are the locations of the 2 .php files that I think you may
          >need to look at:
          >http://findthatlawyer.com/siteadmin/PriceEdit.php
          >http://findthatlawyer.com/siteadmin/SettingsPrices.php[/color]

          We can't look at PHP code that way. When we request those pages, it
          EXECUTES the code and returns the HTML results to us.
          --
          - Tim Roberts, timr@probo.com
          Providenza & Boekelheide, Inc.

          Comment

          • Colin Fine

            #6
            Re: Help: Can you make this .php less than 1 month??

            Tim Roberts wrote:[color=blue]
            > "Novice Computer User" <attorneyatlaw@ hotmail.com> wrote:
            >[color=green]
            >>Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a
            >>total novice and can't seem to figure it out. Here is a .php script.
            >>Right now, the
            >>minimum amount of time (i.e. duration) allowed is 1 month. However, I
            >>want to be able to reduce the minimum amount of time to 1 day (i.e.
            >>24 hours) -- basically a 24 hour trial period.
            >>
            >>Can somebody PLEASE PLEASE tell me what I need to change in this file
            >>to do this?[/color]
            >
            >
            > Nothing. The page you posted is not enforcing the time limitation. That's
            > being done in some other file. You could certainly change the wording here
            > to refer to days instead of months, but the enforcement is happening
            > elsewhere.
            >
            >[color=green]
            >>PS: Here are the locations of the 2 .php files that I think you may
            >>need to look at:
            >>http://findthatlawyer.com/siteadmin/PriceEdit.php
            >>http://findthatlawyer.com/siteadmin/SettingsPrices.php[/color]
            >
            >
            > We can't look at PHP code that way. When we request those pages, it
            > EXECUTES the code and returns the HTML results to us.[/color]

            Indeed. If you are going to ask a question about PHP in a PHP forum, you
            really need to send us the relevant PHP code.
            What you have sent is an entire HTML document that does not contain a
            single atom of PHP!

            Colin

            Comment

            • Novice Computer User

              #7
              Re: Help: Can you make this .php less than 1 month??

              Ok.. Thanks for the info.. I didn't even know I was looking at the
              wrong page.. I THINK this is correct page that I need to modify to
              reduce the 1 month option to 24 hours. I copied/pasted the .php file
              here -- if you can figure out a way to modify the 1 month limit to 24
              hours -- or even 1 hour (whichever is easiest is fine with me), PLEASE
              let me know.. thanks greatly:

              <?
              require_once(". ./conn.php");
              require_once(". ./includes.php");
              require_once("a ccess.php");

              include_once("L eftStyles.php") ;

              ?>

              <script>
              function CheckNewPrice() {

              if(document.f1. PackageName.val ue=="")
              {
              window.alert('E nter the new package name, please!');
              document.f1.Pac kageName.focus( );
              return false;
              }

              if(document.f1. NewPrice.value= ="")
              {
              window.alert('E nter the new price value, please!');
              document.f1.New Price.focus();
              return false;
              }

              if(document.f1. nDuration.value =="")
              {
              window.alert('S elect a duration period, please!');
              document.f1.nDu ration.focus();
              return false;
              }

              if(document.f1. pLevel.value==" ")
              {
              window.alert('S elect a priority level, please!');
              document.f1.pLe vel.focus();
              return false;
              }

              }

              function CheckDelete() {

              if(confirm('Are you sure you want to delete this price?'))
              {
              return true;
              }
              else
              {
              return false;
              }

              }

              </script>

              <form method=post name=f1 onsubmit="retur n CheckNewPrice() ">

              <table align=center>
              <tr>
              <td colspan=2 align=center class=TableHead >Enter a new price</td>
              </tr>

              <tr>
              <td>Package name:</td>
              <td><input type=text name=PackageNam e maxlength=50></td>
              </tr>


              <tr>
              <td>Price:</td>
              <td><input type=text name=NewPrice size=6 maxlength=6></td>
              </tr>

              <tr>
              <td>Duration: </td>
              <td>
              <select name=nDuration>
              <option value=""></option>
              <?
              for($i = '1'; $i <= '12'; $i++)
              {
              echo "<option value=\"$i\">$i </option>\n";
              }
              ?>
              </select> months
              </td>
              </tr>

              <tr>
              <td>Priority Level:</td>
              <td>
              <select name="pLevel">
              <option value=""></option>
              <?
              //create the Priority level select menu
              $q1 = "select * from legal_priority order by PriorityLevel asc ";
              $r1 = mysql_query($q1 ) or die(mysql_error ());
              while($a1 = mysql_fetch_arr ay($r1))
              {
              echo "<option value=\"$a1[PriorityLevel]\">$a1[PriorityLevel] -
              $a1[PriorityName]</option>\n\t";
              }
              ?>
              </select>
              </td>
              </tr>

              <tr>
              <td>&nbsp;</td>
              <td><input type=submit name=s1 value=Save class=sub></td>
              </tr>

              </table>

              </form>

              <?

              if(isset($_POST[s1]))
              {
              $q1 = "insert into legal_prices set
              PackageName = '$_POST[PackageName]',
              PriceValue = '$_POST[NewPrice]',
              Duration = '$_POST[nDuration]',
              PriorityLevel = '$_POST[pLevel]' ";

              mysql_query($q1 ) or die(mysql_error ());
              }

              //show prices
              $q1 = "select * from legal_prices, legal_priority where
              legal_prices.Pr iorityLevel = legal_priority. PriorityLevel order by
              legal_prices.Pr iorityLevel desc";
              $r1 = mysql_query($q1 ) or die(mysql_error ());

              if(mysql_num_ro ws($r1) == '0')
              {
              exit();
              }

              ?>

              <table align=center width=650 cellspacing=0 bordercolor=bla ck
              frame=below>
              <tr>
              <td class=TableHead width=200>Packa ge Name</td>
              <td class=TableHead >Priority Level</td>
              <td class=TableHead align=center>Du ration</td>
              <td class=TableHead align=right>Pri ce</td>
              <td class=TableHead align=center>Ac tion</td>

              <?
              while($a1 = mysql_fetch_arr ay($r1))
              {
              if($a1[Duration] > '1')
              {
              $MyDuration = $a1[Duration]." months";
              }
              else
              {
              $MyDuration = $a1[Duration]." month";
              }

              echo
              "<tr>\n\t<td>$a 1[PackageName]</td>\n\t<td>$a1[PriorityName]</td>\n\t<td
              align=center>$M yDuration</td>\n\t<td align=right>$as et[currency_sign]
              $a1[PriceValue]</td>\n\t<td align=center><a class=GreenLink
              href=\"PriceEdi t.php?PriceID=$ a1[PriceID]\">edit</a> | <a class=RedLink
              href=\"PriceDel ete.php?PriceID =$a1[PriceID]\" onclick=\"retur n
              CheckDelete();\ ">delete</a></td>\n</tr>\n\n ";
              }

              echo "</table>\n\n<br>< br>";
              ?>

              Comment

              • Colin Fine

                #8
                Re: Help: Can you make this .php less than 1 month??

                Novice Computer User wrote:[color=blue]
                > Ok.. Thanks for the info.. I didn't even know I was looking at the
                > wrong page.. I THINK this is correct page that I need to modify to
                > reduce the 1 month option to 24 hours. I copied/pasted the .php file
                > here -- if you can figure out a way to modify the 1 month limit to 24
                > hours -- or even 1 hour (whichever is easiest is fine with me), PLEASE
                > let me know.. thanks greatly:
                >
                > <?
                > require_once(". ./conn.php");
                > require_once(". ./includes.php");
                > require_once("a ccess.php");
                >
                > include_once("L eftStyles.php") ;
                >
                > ?>
                >
                > <script>
                > function CheckNewPrice() {
                >
                > if(document.f1. PackageName.val ue=="")
                > {
                > window.alert('E nter the new package name, please!');
                > document.f1.Pac kageName.focus( );
                > return false;
                > }
                >
                > if(document.f1. NewPrice.value= ="")
                > {
                > window.alert('E nter the new price value, please!');
                > document.f1.New Price.focus();
                > return false;
                > }
                >
                > if(document.f1. nDuration.value =="")
                > {
                > window.alert('S elect a duration period, please!');
                > document.f1.nDu ration.focus();
                > return false;
                > }
                >
                > if(document.f1. pLevel.value==" ")
                > {
                > window.alert('S elect a priority level, please!');
                > document.f1.pLe vel.focus();
                > return false;
                > }
                >
                > }
                >
                > function CheckDelete() {
                >
                > if(confirm('Are you sure you want to delete this price?'))
                > {
                > return true;
                > }
                > else
                > {
                > return false;
                > }
                >
                > }
                >
                > </script>
                >
                > <form method=post name=f1 onsubmit="retur n CheckNewPrice() ">
                >
                > <table align=center>
                > <tr>
                > <td colspan=2 align=center class=TableHead >Enter a new price</td>
                > </tr>
                >
                > <tr>
                > <td>Package name:</td>
                > <td><input type=text name=PackageNam e maxlength=50></td>
                > </tr>
                >
                >
                > <tr>
                > <td>Price:</td>
                > <td><input type=text name=NewPrice size=6 maxlength=6></td>
                > </tr>
                >
                > <tr>
                > <td>Duration: </td>
                > <td>
                > <select name=nDuration>
                > <option value=""></option>
                > <?
                > for($i = '1'; $i <= '12'; $i++)
                > {
                > echo "<option value=\"$i\">$i </option>\n";
                > }
                > ?>
                > </select> months
                > </td>
                > </tr>
                >
                > <tr>
                > <td>Priority Level:</td>
                > <td>
                > <select name="pLevel">
                > <option value=""></option>
                > <?
                > //create the Priority level select menu
                > $q1 = "select * from legal_priority order by PriorityLevel asc ";
                > $r1 = mysql_query($q1 ) or die(mysql_error ());
                > while($a1 = mysql_fetch_arr ay($r1))
                > {
                > echo "<option value=\"$a1[PriorityLevel]\">$a1[PriorityLevel] -
                > $a1[PriorityName]</option>\n\t";
                > }
                > ?>
                > </select>
                > </td>
                > </tr>
                >
                > <tr>
                > <td>&nbsp;</td>
                > <td><input type=submit name=s1 value=Save class=sub></td>
                > </tr>
                >
                > </table>
                >
                > </form>
                >
                > <?
                >
                > if(isset($_POST[s1]))
                > {
                > $q1 = "insert into legal_prices set
                > PackageName = '$_POST[PackageName]',
                > PriceValue = '$_POST[NewPrice]',
                > Duration = '$_POST[nDuration]',
                > PriorityLevel = '$_POST[pLevel]' ";
                >
                > mysql_query($q1 ) or die(mysql_error ());
                > }
                >
                > //show prices
                > $q1 = "select * from legal_prices, legal_priority where
                > legal_prices.Pr iorityLevel = legal_priority. PriorityLevel order by
                > legal_prices.Pr iorityLevel desc";
                > $r1 = mysql_query($q1 ) or die(mysql_error ());
                >
                > if(mysql_num_ro ws($r1) == '0')
                > {
                > exit();
                > }
                >
                > ?>
                >
                > <table align=center width=650 cellspacing=0 bordercolor=bla ck
                > frame=below>
                > <tr>
                > <td class=TableHead width=200>Packa ge Name</td>
                > <td class=TableHead >Priority Level</td>
                > <td class=TableHead align=center>Du ration</td>
                > <td class=TableHead align=right>Pri ce</td>
                > <td class=TableHead align=center>Ac tion</td>
                >
                > <?
                > while($a1 = mysql_fetch_arr ay($r1))
                > {
                > if($a1[Duration] > '1')
                > {
                > $MyDuration = $a1[Duration]." months";
                > }
                > else
                > {
                > $MyDuration = $a1[Duration]." month";
                > }
                >
                > echo
                > "<tr>\n\t<td>$a 1[PackageName]</td>\n\t<td>$a1[PriorityName]</td>\n\t<td
                > align=center>$M yDuration</td>\n\t<td align=right>$as et[currency_sign]
                > $a1[PriceValue]</td>\n\t<td align=center><a class=GreenLink
                > href=\"PriceEdi t.php?PriceID=$ a1[PriceID]\">edit</a> | <a class=RedLink
                > href=\"PriceDel ete.php?PriceID =$a1[PriceID]\" onclick=\"retur n
                > CheckDelete();\ ">delete</a></td>\n</tr>\n\n ";
                > }
                >
                > echo "</table>\n\n<br>< br>";
                > ?>
                >[/color]
                You say you have spent HOURS on this question. I don't wish to seem
                unkind, but what did you spend hours doing?

                Reading an introduction to HTML might help, as would trying to
                understand what the code does.

                ALL that the code above does with Duration is:

                <select name=nDuration>[color=blue]
                > <option value=""></option>
                > <?
                > for($i = '1'; $i <= '12'; $i++)
                > {
                > echo "<option value=\"$i\">$i </option>\n";
                > }
                > ?>
                > </select> months[/color]

                which creates a drop-down menu offering the numbers 1-12. (The only PHP
                here is the loop generating the entries).

                On going to the edit page (I think, I haven't checked the details), it
                saves the data in the database:
                [color=blue]
                > $q1 = "insert into legal_prices set
                > PackageName = '$_POST[PackageName]',
                > PriceValue = '$_POST[NewPrice]',
                > Duration = '$_POST[nDuration]',
                > PriorityLevel = '$_POST[pLevel]' ";[/color]

                Then it displays it for the user to decide what to do. First it does:[color=blue]
                > if($a1[Duration] > '1')
                > {
                > $MyDuration = $a1[Duration]." months";
                > }
                > else
                > {
                > $MyDuration = $a1[Duration]." month";
                > }[/color]

                which gets the duration out the database and sets the variable
                $MyDuration to "1 month" or "6 months" etc.
                Then it displays it to the user offering 'edit' and 'delete'.

                As regards the code above, this is all that happens to it, and you can
                quite happily change the word 'month' to 'day' and the value '12' to
                '24' and it will suddenly offer you 1-24 days instead of 1-12 months.
                (You'll presumably need to make a corresponding change to the original
                HTML file you posted, but I'll leave the details as an exercise).


                However, you haven't shown us what it does with that duration value - I
                guess that's in some other script somewhere that gets it out of the
                database - and since it's about a duration that expires, I would guess
                that it's not a web script at all, but another script or program that is
                run every month. (This might be manual but is more likely to be
                automatic. If you are on a unix-like system it's probably run by 'cron',
                on Windows there's something called ? Windows scheduler ? )
                Presumably that script does some date calculation, and you'll have to
                tell it that duration has suddenly become days rather than months. Oh,
                and you'll have to arrange to run it every day.

                Colin

                Comment

                Working...