php - How to get values from one form to another -
can 1 me values of 2 different dates when press button form? i'm able value of 1 date. php scripts:
<?php require_once 'incs/functions.php'; require_once 'classes/database.php'; global $database; $from_date = isset($_post['from_date']) != "" ? $_post['from_date']: date('y-m-d'); $to_date = isset($_post['to_date']) != "" ? $_post['to_date']: date('y-m- d'); $urlp = "print_one.php? uid= $from_date"; ?>
here's code button:
<?php echo "<a onclick=\"return windowpop('".$urlp."', 700, 500)\" href='#'> <button class='btn btn-round btn-white btn-size:50px;' style='alignment- baseline:left-90px;'>print</button></a>"; ?>
as can see, when press button "print_one.php" form opens "from_date" value. how both values of "from_date" , "to_date" second form known "print_one.php" when press button can use them run query.
please help.
as far know, query string (which urlip contains) accessible through $_get, not $_post. $_post need submit form. difference values from_date , to_date not visible in query string, sent in post header of http request.
even further, if choosing post method instead of get, receiving script need redirect http post call page(or same), if press in browser, wouldn't window saying "there data posted ...". bottom line is, post preferred , correct way pass data browser server.
Comments
Post a Comment