Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML PHP
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">
    <p>Price:
        <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>
    </p>
    <div id="bottom-both-button">
        <input type="submit" class="book-button3" value="" style="margin-left:120px; margin-top:10px;" />
        <div class="skips-repeat-check">
            <p>Price:</p>
            <label>&pound; <?php if($amount=='') { echo $calculatedprice; } else { echo $amount; } ?></label>
        </div>
    </div>
the code for the booking page is
<div class="skips-repeat">
    <p>Price:</p>
    <div class="price-input">
        <p style="background:none;">&pound; 
            <span id="priceload"> <?php echo $_POST['calculatedprice']; ?></span>
        </p>
        <?php $calculatedprice = $_POST['calculatedprice'];?>
        <!--input type="hidden" name="calculatedprice" value="<?php echo $calculatedprice; ?>" /-->
    </div>
   <span></span>
</div>
 
the code for the checkout page is
$_SESSION['calculatedprice'] = $_POST['calculatedprice'];
<div class="skips-repeat-check">
    <p>Price:</p>
    <label>&pound; <?php if($amount=='') { echo $calculatedprice; } else { echo $amount; } ?></label>
</div>
how would i be able to reatin the values back to the booking form?
Posted 18-Apr-13 4:13am
Edited 18-Apr-13 5:32am
(no name)47.8K
v4
Comments
Prasad Khandekar at 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 at 18-Apr-13 10:35am
   
How about passing it via a query string, unless it is secure information of course.
patrick_green at 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
0 OriginalGriff 400
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 DamithSL 95
4 Garth J Lancaster 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,032
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,220


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 18 Apr 2013
Copyright © CodeProject, 1999-2014
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