Re: [PHP] issue a value on header, not working..

2004-07-26 Thread Louie Miranda
ah ic, thanks. it now works fine.

thanks also for the tip! :)

On Mon, 26 Jul 2004 23:29:06 -0700, Justin Patrin <[EMAIL PROTECTED]> wrote:
> On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <[EMAIL PROTECTED]> 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] issue a value on header, not working..

2004-07-26 Thread Justin Patrin
On Tue, 27 Jul 2004 11:59:14 +0800, Louie Miranda <[EMAIL PROTECTED]> 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--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] issue a value on header, not working..

2004-07-26 Thread zareef ahmed

--- Louie Miranda <[EMAIL PROTECTED]> 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..

Yes it is simple just change your single quotes to
double quotes. i.e.

 header("Location: clients/FILES/$catchresult");

zareef ahmed  

> 
> -- 
> Louie Miranda
> http://www.axishift.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com




__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] issue a value on header, not working..

2004-07-26 Thread Louie Miranda
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..

-- 
Louie Miranda
http://www.axishift.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php