Link to home
Start Free TrialLog in
Avatar of arkam chou
arkam chou

asked on

Keep Value after using POST PHP

Dear Expert,

I want to keep value with INPUT Element. When click submit, the INPUT Element keep last value. when first load, it get value from current date in code from php server.

<form role="form" method="post" id="myForm">
    <div class="col-sm-2">
        <input id="daterange" class="form-control" type="text" name="daterange" value="<?php
        echo Date("Y-m-d");
        echo " - ";
        echo Date("Y-m-d")
        ?>"  style="cursor: pointer"/>
    </div> 
    <div class="form groups col-sm-1">
        <input type="submit" name="submit" value="view" class="btn btn-primary btn-block">
    </div>
</form>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of John Easton
John Easton
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial