Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Jul 2003
    Posts
    11
    Member #
    2142
    remember previous page's info on form

    nowm im a COMPLETE nebie to javascript, but i know C++. I heard that you could remember the previous page's information on a form using cookies. Can anyone point me to a complete tutorial on how to use cookies this way? anybody have any other suggestions?

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Are you submitting the form to a process page?
    JR

  4. #3
    Junior Member
    Join Date
    Jul 2003
    Posts
    11
    Member #
    2142
    yes, to go to the next page, a submit button is used to direct the page to a dll, which processes the next page.

    basically, i have no clue on how to complete the task of remememering.

  5. #4
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Put this on top of your process page:
    PHP Code:
    session_start();
    header("Cache-control: private");
    $_SESSION['element1'] = $_POST['formelementname']; 
    That should work, repeat for all the elements in your form.

    Put session_start() on pages where you want it to be used again, it must be the first thing on the page though. For example:
    PHP Code:
    <?php session_start(); ?>
    <html>
    <head>
    <title>Sessions Test</title>
    </head>
    <body>
    <?php echo $_SESSION['element1']; ?>
    </body>
    </html>
    For some reading on sessions, check out http://www.php.net/session
    JR

  6. #5
    Junior Member
    Join Date
    Jul 2003
    Posts
    11
    Member #
    2142
    should i create a php file? how do i name it?

  7. #6
    Junior Member
    Join Date
    Jul 2003
    Posts
    11
    Member #
    2142
    when you submit, a dll populates the fields in an html.

  8. #7
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    I haven't got a clue how that works, sorry

    You would probably be better off using just php to process the form, I don't know, depends what you are trying to do.
    JR

  9. #8
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    DLL? Are you using Microsoft technologies? ASP / COM ?

  10. #9
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    Can you post some of your code, or a link to it so that we can see it? We could get a much better handle on the situation with one of those.
    - Brian

  11. #10
    Junior Member
    Join Date
    Jul 2003
    Posts
    11
    Member #
    2142
    forget about it, the problem has been solved. thx anyway.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:40 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com