php-general Digest 1 Feb 2009 14:26:37 -0000 Issue 5934

Topics (messages 287502 through 287504):

Re: Mail subject encoding problem
        287502 by: Manuel Lemos

Re: More questions about SESSION use
        287503 by: David Robley
        287504 by: Terion Miller

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hello,

on 01/30/2009 11:43 AM Thodoris said the following:
> Yes I know that this is not reasonable but using UTF-8 fails. And this
> seems to work in some cases. I am thinking that this has to do with
> PHP's internal encoding or something with the OS. I am not sure why that
> works this way that's why I am asking for some enlightenment  :-)
> 
> Is there something that I need to set for PHP to change its behavior.

You cannot send 8 bit characters in e-mail. For headers you need to use
q-encoding to make your non-ASCIIC characters be represented with only
ASCII characters.

If you are not sure on how to encode message headers with q-encoding,
you may want to try this MIME message class. Take a look at the
test_email_message.php example to learn how to send messages with
non-ASCII characters on the headers or body.

http://www.phpclasses.org/mimemessage


-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Terion Miller wrote:

> So now I have SESSIONs set: user, AdminID, AdminLogin
> 
> but I'm trying to use them without showing them in links...currently the
> pages only load if I make the links like this:
> 
> <a href="Welcome.php?AdminID=<?php echo $_SESSION['AdminID']; ?>"
> target="mainFrame">Home</a>
> 
> I thought the whole purpose of having/using Sessions is to not have to
> pass variables in url's, but if I remove the session in the link above
> when I click to it, It logs me out, even though it IS holding the SESSION
> (which I checked by revealing my variables) so I guess I am confused about
> this bit of code, I think its saying if the SESSION is there great if not
> logout... but even when I expose the variables and see that the session is
> passing from page to page it keeps sending me to the logout page:
> 
> This is how it was originally written:
> if (empty($_SESSION['AdminLogin']) || $_SESSION['AdminLogin'] !=  true){
>     header ("Location: LogOut.php");
>     $_SESSION['user']=$UserName;
>     $_SESSION['AdminID']=$AdminID; <--*I added this one originally the
> script only used 'user' and 'AdminLogin'* but passed them in urls
> }
> 
> 
> Is the above part not needed since the Session is already active? Should I
> be not using the header part (honestly I havent read up on that chapter
> yet)

Are you using session_start()? 


Cheers
-- 
David Robley

The Hubbell works fine; all that stuff IS blurry!
Today is Boomtime, the 32nd day of Chaos in the YOLD 3175. 


--- End Message ---
--- Begin Message ---
> >
> > This is how it was originally written:
> > if (empty($_SESSION['AdminLogin']) || $_SESSION['AdminLogin'] !=  true){
> >     header ("Location: LogOut.php");
> >     $_SESSION['user']=$UserName;
> >     $_SESSION['AdminID']=$AdminID; <--*I added this one originally the
> > script only used 'user' and 'AdminLogin'* but passed them in urls
> > }
> >
> >
> > Is the above part not needed since the Session is already active? Should
> I
> > be not using the header part (honestly I havent read up on that chapter
> > yet)
>
> Are you using session_start()?
>
>
> Cheers
> --
> David Robley
>
> Hi David, yes I have session_start(); on everypage very 1st line.

terio

--- End Message ---

Reply via email to