SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up multiple page signup

    hi
    i want to know how can i make multiple page sign up,like in many site having step by step user sign up on different pages . how can i keep track of records he entered on each page coz i m having only one user info table and also if ofr some reason user quits in middle of siegnup means not complete it e.g on third page of four pages all so no data should be entered in table even which he has been submitted on previuos pages. if i can get code it willbe very helpful for me.thanks
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    SitePoint Wizard GoldFire's Avatar
    Join Date
    Oct 2002
    Location
    Oklahoma City, OK
    Posts
    1,517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well there are several ways you could do this, but just one could be to pass all the values through the pages as POST in hidden fields and insert it all on the last page.

  3. #3
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Putting all the values in a session array makes management easier.

  4. #4
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but putting all in hidden fields not making a bit hard if so mnay data.thesecnd one seems good.but how to put i array session? any examlpe???
    its urgent plzzz.....
    regards
    phphelp

  5. #5
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phphelp
    but putting all in hidden fields not making a bit hard if so mnay data.thesecnd one seems good.but how to put i array session? any examlpe???
    PHP Code:

    session_start
    ();

    //data sanitization, validation code here

    //hypothetical post variable retrieval
    $someValue1 $_POST['formVal1'];
    $someValue2 $_POST['formVal2'];
    $someValue3 $_POST['formVal3'];
    $someValue4 $_POST['formVal4'];

    session_register("formVars");

    //hypothetical value assignment to session array variable
    $formVars['var1'] = $someValue1;
    $formVars['var2'] = $someValue2;
    $formVars['var3'] = $someValue3;
    $formVars['var4'] = $someValue4

  6. #6
    SitePoint Wizard GoldFire's Avatar
    Join Date
    Oct 2002
    Location
    Oklahoma City, OK
    Posts
    1,517
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well like I said, there are several ways of doing this. Either way will work fine, it is just up to you which you would like to use.

  7. #7
    orange pips! orange pips!
    Join Date
    Oct 2001
    Location
    Its all about location
    Posts
    652
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by phphelp
    but putting all in hidden fields not making a bit hard if so mnay data.thesecnd one seems good.but how to put i array session? any examlpe???
    Like so:
    PHP Code:
    session_register("yourarray");
    $yourarray = array();
    $yourarray[] = "value1";
    $yourarray[] = "value2";
    $yourarray[] = "value3"

  8. #8
    Are You There? KDesigns's Avatar
    Join Date
    Oct 2003
    Location
    Your Monitor
    Posts
    1,147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way I normally do this is by adding a 'status' and a 'date_joined' column to my database table. The default for 'status' is '0' which shows me the sign-up hasn't yet been complete. When they complete sign-up 'status' changes to '1' to signify the sign-up is complete.

    I then can run a regular CRON job to clean-up old status 0 sign-ups by the value in the date_joined field.

    Just another method!
    ChooseDaily.com - Follow on Twitter
    Top Resources for Web Designers and Developers Every Day!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •