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

From: Date: Tue, 27 Jul 2004 06:29:06 +0000
Subject: Re: issue a value on header, not working..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191939@lists.php.net to get a copy of this message
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--

« previous php.general (#191939) next »