Passing data between pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a simple script that creates a series of links based on the results of a
query.  As you can see from the code below, I am currently appending the query
info to the URL, but I don't believe this to be an ideal solution.

    <?
    $query = "SELECT * FROM categories ORDER BY cat_id";
    $result = mysql_query( $query );

    while ( $row = mysql_fetch_array( $result ) )
        print "<a
href=\"display_items.php?cat_id=".$row['cat_id']."\">".$row['cat_name']."</a><br
/>\n";
    ?>

A search of numerous online resources and my collection of books leads me to
believe that I have two basic options: the first is to use a form, which I am
unsure of how to do with text links.  The second is to implement sessions, which
I feel may be overkill.  Overkill, that is, unless it's my only option. ;P

I look forward to all of your suggestions.  I'm sure I'm overlooking something
that should otherwise be easy, so I apologize in advance.  Thanks a lot.

Edward Dudlik
Becoming Digital
www.becomingdigital.com




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux