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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.