cooldude832 Posted November 23, 2007 Share Posted November 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 23, 2007 Share Posted November 23, 2007 session i guess is the solution Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 23, 2007 Author Share Posted November 23, 2007 I thought about this, I'd just have to reset the sessions each time, I think i'll try that Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 23, 2007 Author Share Posted November 23, 2007 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?? Quote Link to comment Share on other sites More sharing options...
HaLo2FrEeEk Posted November 23, 2007 Share Posted November 23, 2007 sessions are best bet, or you could echo the post information into a hidden form, then have the update link submit the form using javascript (javascript:document.form.submit()), that would work too, but not as efficiently as sessions. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 24, 2007 Author Share Posted November 24, 2007 well i do repass em with hidden inputs, but then i register sessions it works so thats all i care Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.