need some help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PHPkemon

    need some help

    Hello,

    I'm fairly new to PHP and MySQL but know the basics to create a dynamic
    page.
    To get to know PHP and MySQL a little better I want to create a simple
    webshop. (yeah why start small, right ;-)

    I think I've figured out how to do the main things like storing products in
    de database by an form and then showing the products on the pages using a
    SQL-query. Note: I think I know how I will do this..... it's all in my head
    ;-)

    The thing I need help with is the shopping basket when someone isn't an
    authenticated user. What's the best way to do this?
    Should I use the SESSIONS thing? And am I right in my assumption that things
    from the SESSION aren't permanently stored in my db? Or is there a better
    way to do this?

    Hope y'all understand what the hell I'm talking about because I sure don't
    ;-)

    TIA!!


  • Justin Koivisto

    #2
    Re: need some help

    PHPkemon wrote:
    [color=blue]
    > I think I've figured out how to do the main things like storing products in
    > de database by an form and then showing the products on the pages using a
    > SQL-query. Note: I think I know how I will do this..... it's all in my head[/color]

    Get it out of your head and on paper with diagrams before you start, or
    you may be struggling later. Remember, planning is the first step. If
    you skip it and go right to coding you may have problems with more
    complex programming and interfacing.
    [color=blue]
    > The thing I need help with is the shopping basket when someone isn't an
    > authenticated user. What's the best way to do this?[/color]

    It all depends on your requirements. Plan out everything else first,
    then decide how the cart will need to interact with the rest.
    [color=blue]
    > Should I use the SESSIONS thing?[/color]

    most likely
    [color=blue]
    > And am I right in my assumption that things
    > from the SESSION aren't permanently stored in my db? Or is there a better
    > way to do this?[/color]

    Normally, session information isn't stored in a database. To make that
    happen, you have to use custom session handlers. Sessions use a garbage
    collection routine to remove any old data. This can be customized
    through the use of custom handlers and the gc_probability

    --
    Justin Koivisto - spam@koivi.com
    PHP POSTERS: Please use comp.lang.php for PHP related questions,
    alt.php* groups are not recommended.

    Comment

    Working...