Jump to content

Resending Post Data?


cooldude832

Recommended Posts

I think I can do this, but I want to make sure.

 

I have a page that loads a calendar via POST (It can't be done with GET so don't suggest that)

after you update some bookings it processes via POST and I want to return it back to the calendar page, but the page is set to purposely not load if it doesn't know what Year, Month, and the Location it needs to be querying for.  How can I reset this data, I thought of sending the user back in the browser, but I don't know how that would work as I can't envoke php going backwards.

 

I could write a note saying please go back in your browser and refresh, but I want a better solution.

Link to comment
https://forums.phpfreaks.com/topic/78616-resending-post-data/
Share on other sites

I did this on the calendar page

<?php
if(empty($_POST['condo_id'])){
$id = $_SESSION['rental'];
$carry_month = $_SESSION['month'];
$carry_year = $_SESSION['year'];
}
else{
$id = $_POST['condo_id'];
$carry_month = $_POST['month'];
$carry_year = $_POST['year'];
}
?>

and on the processor

<?php
$_SESSION['year'] = $_POST['year'];
$_SESSION['rental'] = $id;
$_SESSION['month'] = $_POST['month'];
header("location: condo_date.php");
?>

which is working fine.  Any issues??

Link to comment
https://forums.phpfreaks.com/topic/78616-resending-post-data/#findComment-397805
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.