|
Posted by toedipper on 07/14/05 00:52
Oli Filth wrote:
> toedipper wrote:
>
>>Hello,
>>
>>php and mysql
>>
>>I have the code below. It's a mixture of my hand coding and dreamweaver
>>created code. It's meant to log a download and then start the download.
>> I can do the first part ok as I can check the db and see that there is
>>an entry but the download won't start, it just sits there and nothing
>>downloads.
>>
>>As well as the main code below I have the first bit at the top in
>>between the <head> tags on the html section, I am trying to redirect
>>focus to the $dllink which I've assigned from the select query.
>>
>>The value of the dllink field which should be assigned to $dllink in my
>>db is something like
>>
>>www.somedomain.com/thefile.zip
>>
>>Thanks,
>>
>>td.
>>
>>-- this bit with head tags on page
>><? echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"3\"
>>URL="http://\"$dllink\" >; ?>
>>
>>
>>-- all code below does the dirty work
>><?
>>session_start();
>>if ($_SESSION[loggedin] != "yes") {
>> header("Location: http://127.0.0.1/custlogin.php");
>> exit; }
>
> <...SNIP...>
>
> You can't send headers if you've already output text. Headers (and
> session_start(), for that matter) must be called before *any* output.
>
Hello,
The session bit does come at the start, the above is a cut and paste and
I just paste the bit within the head tags to display my point.
Any more ideas folks?
td.
Navigation:
[Reply to this message]
|