close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Modify Information Button loses info

Thread began 7/03/2009 11:15 am by grantr281040 | Last modified 7/06/2009 12:14 pm by CraigR | 1546 views | 3 replies |

grantr281040

Modify Information Button loses info

Happy 4th all!

When I hit the "modify information" button on my confirm.php page it returns to my checkout.php page as it should but all of the info is gone that was previously typed in.

Any idea how to fix this one?

Thanks!

Grant

Sign in to reply to this post

CraigRBeta Tester

session variables

I did it like this...

On your confirm page, set a session variable for each field in your checkout form.

eg firstname

<?php
if (!session_id()) session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION["eCartCheckoutForm_firstname"] = "".((isset($_POST["firstname"]))?$_POST["firstname"]:"") ."";
}
?>

On your checkout page your firstname field should look like this...

<input type="text" name="firstname" id="firstname" value="<?php if (isset($_SESSION['eCartCheckoutForm_firstname'])){ echo $_SESSION['eCartCheckoutForm_firstname'];} ?>"/></td>

repeat for the remaining fields.

Sign in to reply to this post

grantr281040

It looks like my confirm page is correct but my checkout page is positively where the problem is. What you posted definately seems to cure it for all of the "text" imput sections. eCart created all of these fields so I assumed they were right. I guess I shouldn't assume stuff. Any Idea how I would address the "select lists"?

Thanks for all the help!

Grant

Sign in to reply to this post

CraigRBeta Tester

I must admit I had a problem with the select lists, as checking the sessionid for every possible county & country (UK) meant my page size became really big.

What i did as a 'fix' was keep use a simple text field for county and country.

I did however add a 'shipping region' the code looked like this...

<select name="region" id="region" >
<option value="" selected="selected">**-Select Region-**</option>
<option value="0" <?php if (!(strcmp(0, $_SESSION['eCartCheckoutForm_region']))) {echo "selected=\"selected\"";} ?>>United Kingdom</option>
<option value="2" <?php if (!(strcmp(2, $_SESSION['eCartCheckoutForm_region']))) {echo "selected=\"selected\"";} ?>>United States</option>
<option value="1" <?php if (!(strcmp(1, $_SESSION['eCartCheckoutForm_region']))) {echo "selected=\"selected\"";} ?>>EU</option>
</select>

with the corresponding code on the confirm page as before.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...