RE: [PHP] Variabe != Value???

From: Date: Fri, 16 May 2003 21:54:18 +0000
Subject: RE: [PHP] Variabe != Value???
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147985@lists.php.net to get a copy of this message
You also need to put a \" at the end to close off the href tag... <A href=\"".$PHP_SELF."?product_list&action=editproduct&product_id=0001\">EDIT< /a> > -----Original Message----- > From: John W. Holmes [mailto:holmes072000@charter.net] > Sent: Friday, May 16, 2003 3:55 AM > To: 'César Aracena'; php-general@lists.php.net > Subject: RE: [PHP] Variabe != Value??? > > > > I just found a very strange thing inside my code. I tried to make a > > standard GET link like: > > > > <a > > > href=\"".$PHP_SELF."?product_list&action=editproduct&product_i > d=0001>EDI > T< > > /a> > > > > which should work right?.... WRONG!!!! > > > > when I try to recognize the "$action" variable it just goes through > > without reading it... I checked my code for hours and every IF and > ELSEIF > > look fine. Now, if I take the "$action" variable away and justleaves > > "editproduct", the code listen ok... Any ideas? maybe a reserved > variable? > > You need a variable name and an equal sign in the URL with an optional > value. So you want something like this: > > href=\"".$PHP_SELF."?product_list=&action=editproduct&product_ > id=0001>ED > IT< > > Notice the equal sign after "product_list" that was missing. > The old way > you were doing it was probably trying to create a variable named > "product_list&action" which isn't valid. > > ---John W. Holmes... > > PHP Architect - A monthly magazine for PHP Professionals. Get > your copy > today. http://www.phparch.com/ > > PS: The "optional" value may not be correct according to some > specifications. I don't know if XHTML or HTML 4 or whatever > require you > to have a value portion in the URL or not... > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#147985) next »