Re: issue a value on header, not working..

From: Date: Tue, 27 Jul 2004 06:43:14 +0000
Subject: Re: issue a value on header, not working..
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-191941@lists.php.net to get a copy of this message
ah ic, thanks. it now works fine. thanks also for the tip! :) On Mon, 26 Jul 2004 23:29:06 -0700, Justin Patrin <papercrane@gmail.com> wrote: > On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <lmiranda@gmail.com> wrote: > > This outputs a filename on $catchresult, and im working on redirecting > > it to that file via header. But when ever i run this the value of > > $catchresult is not being pass to the header() on php. > > > > $catchresult = $db_view->getOne($getfile); > > header('Location: clients/FILES/$catchresult'); > > > > Hmm, it seems simple but, its really not working.. > > > > When using single quotes, variables aren't replaced by their content. > Using double quotes would fix it, but consider this alternative: > > header('Location: clients/FILES/'.$catchresult); > > Cleaner, more obvious that you're using a variable, will be > highlighted correctly by syntax highlighters, and, most important, > it's faster. :-) > > -- > DB_DataObject_FormBuilder - The database at your fingertips > http://pear.php.net/package/DB_DataObject_FormBuilder > > paperCrane --Justin Patrin-- > -- Louie Miranda http://www.axishift.com

« previous php.general (#191941) next »