Re: [PHP-DB] Sessions and their function
You sould register sessions first, and if have been registered, are passing with session_start() in each page at the top, before the html tag.. If you want to pass variables from a page to another, put them in the url: test.php?var=3name=george (e.g.) Be sure that the page you refer is dynamic (.php) - - Original Message - From: LOUD, Mark [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, September 12, 2002 12:02 PM Subject: [PHP-DB] Sessions and their function Hi, I know this my sound stupid but here it goes.. Can sessions be used to pass variables from one page to the next to create persistent data? I have this working to a certain extent but can only pass a variable to my second page, but not from my second page onto the third. Also in my second page I cannot change the value of this variable i.e. bob = 100 on page 1, in page 2 I can display bob equalling 100 but then I want to a) alter the value of bob to 50 and b) send bob and its new value to third page. Can this be done by using sessions? Also how do you pass the session id of one page onto the next? do you pass it on the end of the page reference e.g. echo FORM METHOD=GET ACTION='msltest3.php'.SID.; Any help would be grateful even if it was to tell me that I have got the wrong idea about sessions altogehter. Thanks Mark CONFIDENTIALITY NOTICE The information contained in this e-mail is intended only for the confidential use of the above named recipient. If you are not the intended recipient or person responsible for delivering it to the intended recipient, you have received this communication in error and must not distribute or copy it. Please accept the sender's apologies, notify the sender immediately by return e-mail and delete this communication. Thank you. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] extracting unique entries from mysql dbase
Hi everyone, I have a mysql row similar to the list below. What I need to do is have php output a link list from this. I'm new to php but in my head I picture something like: ? foreach unique entry in $row_links['dbase'] { echo a href=$PHP_SELF?catagory=Wind Chimes - Classic Hand-Tuned Collection - SongbirdsLINK TEXT/a; } ? The links will be on the same page thus the $php_self. The script will take a GET variable called category to display the proper items from the dbase. It's the foreach statment or whatever it should be that I need a bit of help with. Any ideas would be greatly appreciated! Thanks, Tim Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Geotunes Wind Chimes - Geotunes Wind Chimes - Geotunes Wind Chimes - Geotunes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] extracting unique entries from mysql dbase
What you want to do is common, everyday stuff. There are lots of examples. There's a fine manual at www.php.net, fully commented. If you have a look at mysql_query() I believe there is an example in the explanatory text / comments on how to use the returned results. There are also lots of tutorials and examples, key words would be php, database web site. And, as always, Juli Meloni's www.thickbook.com, which has some really well-developed tutorials. Hope this points you in the right direction - Miles Thompson At 08:49 PM 9/12/2002 -0700, Godzilla wrote: Hi everyone, I have a mysql row similar to the list below. What I need to do is have php output a link list from this. I'm new to php but in my head I picture something like: ? foreach unique entry in $row_links['dbase'] { echo a href=$PHP_SELF?catagory=Wind Chimes - Classic Hand-Tuned Collection - SongbirdsLINK TEXT/a; } ? The links will be on the same page thus the $php_self. The script will take a GET variable called category to display the proper items from the dbase. It's the foreach statment or whatever it should be that I need a bit of help with. Any ideas would be greatly appreciated! Thanks, Tim Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Geotunes Wind Chimes - Geotunes Wind Chimes - Geotunes Wind Chimes - Geotunes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] extracting unique entries from mysql dbase
Tim, In your query use SELECT DISTINCT, rather than SELECT. That way you will not get duplicates returned from the database. Miles At 08:49 PM 9/12/2002 -0700, Godzilla wrote: Hi everyone, I have a mysql row similar to the list below. What I need to do is have php output a link list from this. I'm new to php but in my head I picture something like: ? foreach unique entry in $row_links['dbase'] { echo a href=$PHP_SELF?catagory=Wind Chimes - Classic Hand-Tuned Collection - SongbirdsLINK TEXT/a; } ? The links will be on the same page thus the $php_self. The script will take a GET variable called category to display the proper items from the dbase. It's the foreach statment or whatever it should be that I need a bit of help with. Any ideas would be greatly appreciated! Thanks, Tim Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Classic Hand-Tuned Collection - Songbirds Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Constellations Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Duets Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Energy Chimes Wind Chimes - Geotunes Wind Chimes - Geotunes Wind Chimes - Geotunes Wind Chimes - Geotunes -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php