Click here to Skip to main content
13,089,433 members (58,758 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have two forms one on the home page, the home page form is supposed to pass the form values to the booking form and values are passed through POST and forwarded to checkout page
but on the checkout page i have an edit form button,when edit button is clicked the values are not restored on the booking page again the code for the index.php form is
<div class="Required">
        <div class="price-input" style="width:297px;">
            <span style=" background-color:#FFFFFF;color: #2B2B2B;float: left;font-family: Arial,Helvetica,sans-serif;font-size: 13px;font-weight: bold;line-height: 20px;text-align: right;width: 115px;">&pound;&nbsp;</span>
            <span id="priceload">0</span>
    <div id="bottom-both-button">
        <input type="submit" class="book-button3" value="" style="margin-left:120px; margin-top:10px;" />
        <div class="skips-repeat-check">
            <label>£ <?php if($amount=='') { echo $calculatedprice; } else { echo $amount; } ?></label>

the code for the booking page is
<div class="skips-repeat">
    <div class="price-input">
        <p style="background:none;">£ 
            <span id="priceload"> <?php echo $_POST['calculatedprice']; ?></span>
        <?php $calculatedprice = $_POST['calculatedprice'];?>
        <!--input type="hidden" name="calculatedprice" value="<?php echo $calculatedprice; ?>" /-->

the code for the checkout page is
$_SESSION['calculatedprice'] = $_POST['calculatedprice'];
<div class="skips-repeat-check">
    <label>£ <?php if($amount=='') { echo $calculatedprice; } else { echo $amount; } ?></label>

how would i be able to reatin the values back to the booking form?
Posted 18-Apr-13 3:13am
Updated 18-Apr-13 4:32am
Prasad Khandekar 18-Apr-13 10:35am
From index page how are you passing value (calculatedprice) to booking page. Label won't help you in passing the value. You will have to have a hidden filed named calculatedprice.
richcb 18-Apr-13 10:35am
How about passing it via a query string, unless it is secure information of course.
patrick_green 19-Apr-13 3:33am
i am passing it via label name and accesing it through post
the main requirement is to retain back the values from the checkout page and i don't know how to do that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100