sending array from javascript through url in php page but -
rooms array
window.location = "booking_status.php?array="+ json.stringify(rooms);
sending javascript php page on php page url show full array value store in array in page address bar url that
http://localhost/zalawadi/booking_status.php?array=[{%22id%22:10,%22rate%22:100}]
i want prevent data show in url %22id%22:10,%22rate%22:100
i decoding on php page other way send array data javascript php page
you can use hidden form , post method. use $_post instead of $_get.
<form action="script.php" onsubmit="this.firstchild.value=json.stringify(value);"> <input type="hidden" value="" /> <a href="javascript:this.form.submit();">link text</a> </form>
Comments
Post a Comment