[PHP] varible in url question
on my page (lessen.php) i have a variable $sort if this varible is empty if enterd the page then it will be set on 'day' i have 3 links in the page lessen.php?sort=day lessen.php?sort=game lessen.php?sort=player so these links refure to the same page (itself) on clicked it opens itself and should set the varible to day, game or player but that doesn't happen. can somebody help me please see attachmend greetz cid begin 666 lessen.php M/#]P:' -T*:68H(21S;W)T*7L-B1S;W)T(#T(F1A2([#0I]#0H-F5C M:\H(G-OG0Z(B N(1S;W)T*3L-C\^#0H-CQ(5$U,/T*/$A%040^#0H) M/%1)5$Q%/CPO5$E43$4^#0H-T*/](14%$/T*/$)/1%D^#0H\!A;EG M;CTBFEG:'0B(#XN3$534T5.4D]/4U1%4CPO#X-CQT86)L92!W:61T:#TB M,3 P)2(8F]R95R/2(P(B!C96QLW!A8VEN9STB,2(/T*( \='(/B - MB ( \=0@=VED=](C$W)2(^/$:')E9CTB;5SV5N+G!H#]S;W)T M/61A2(=%R9V5T/2)?V5L9B(^9%Y/]A/CPO=0^#0H( /'1D('=I M9'1H/2(Q.24B/DAO=7(\+W1D/T*3QT9!W:61T:#TB,S$E(CX\82!HF5F M/2)L97-S96XNAP/W-OG0]9V%M92(=%R9V5T/2)?V5L9B(^9V%M93PO M83X\+W1D/T*3QT9!W:61T:#TB,S,E(CX\82!HF5F/2)L97-S96XNAP M/W-OG0]QA65R(B!T87)G970](E]S96QF(CYP;%Y97(\+V$^/]T9#X- JCPO='(^#0H-CPO=%B;4^#0H-T*#0H\+T)/1%D^#0H\+TA434P^ ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] varible in url question
It works fine on my system. If you have register globals off you'll need to do it this way: ?php $sort = (!$_GET[sort]) ? 'day' : $_GET[sort]; echo(sort: . $sort); ? Rick And many strokes though with a little axe hew down and fell the hardest-timbered oak. - Shakespeare From: sven vandamme [EMAIL PROTECTED] Date: Wed, 10 Jul 2002 22:40:48 +0200 To: [EMAIL PROTECTED] Subject: [PHP] varible in url question on my page (lessen.php) i have a variable $sort if this varible is empty if enterd the page then it will be set on 'day' i have 3 links in the page lessen.php?sort=day lessen.php?sort=game lessen.php?sort=player so these links refure to the same page (itself) on clicked it opens itself and should set the varible to day, game or player but that doesn't happen. can somebody help me please see attachmend greetz @cid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] varible in url question
Php4? or 3? Have you tried $_GET[sort] --- Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: [EMAIL PROTECTED] Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business --- -Original Message- From: sven vandamme [mailto:[EMAIL PROTECTED]] Sent: Thursday, 11 July 2002 6:41 AM To: [EMAIL PROTECTED] Subject: [PHP] varible in url question on my page (lessen.php) i have a variable $sort if this varible is empty if enterd the page then it will be set on 'day' i have 3 links in the page lessen.php?sort=day lessen.php?sort=game lessen.php?sort=player so these links refure to the same page (itself) on clicked it opens itself and should set the varible to day, game or player but that doesn't happen. can somebody help me please see attachmend greetz @cid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] varible in url question
Please read this manual page, it has examples to suit your needs: http://www.php.net/manual/en/language.variables.external.php Regards, Philip Olson On Wed, 10 Jul 2002, sven vandamme wrote: on my page (lessen.php) i have a variable $sort if this varible is empty if enterd the page then it will be set on 'day' i have 3 links in the page lessen.php?sort=day lessen.php?sort=game lessen.php?sort=player so these links refure to the same page (itself) on clicked it opens itself and should set the varible to day, game or player but that doesn't happen. can somebody help me please see attachmend greetz cid begin 666 lessen.php M/#]P:' -T*:68H(21S;W)T*7L-B1S;W)T(#T(F1A2([#0I]#0H-F5C M:\H(G-OG0Z(B N(1S;W)T*3L-C\^#0H-CQ(5$U,/T*/$A%040^#0H) M/%1)5$Q%/CPO5$E43$4^#0H-T*/](14%$/T*/$)/1%D^#0H\!A;EG M;CTBFEG:'0B(#XN3$534T5.4D]/4U1%4CPO#X-CQT86)L92!W:61T:#TB M,3 P)2(8F]R95R/2(P(B!C96QLW!A8VEN9STB,2(/T*( \='(/B - MB ( \=0@=VED=](C$W)2(^/$:')E9CTB;5SV5N+G!H#]S;W)T M/61A2(=%R9V5T/2)?V5L9B(^9%Y/]A/CPO=0^#0H( /'1D('=I M9'1H/2(Q.24B/DAO=7(\+W1D/T*3QT9!W:61T:#TB,S$E(CX\82!HF5F M/2)L97-S96XNAP/W-OG0]9V%M92(=%R9V5T/2)?V5L9B(^9V%M93PO M83X\+W1D/T*3QT9!W:61T:#TB,S,E(CX\82!HF5F/2)L97-S96XNAP M/W-OG0]QA65R(B!T87)G970](E]S96QF(CYP;%Y97(\+V$^/]T9#X- JCPO='(^#0H-CPO=%B;4^#0H-T*#0H\+T)/1%D^#0H\+TA434P^ ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php