[PHP] Re: jumping between php and html or using echo for printing html-tags.

2003-02-09 Thread Askengren
I do not know why so many developers use the "-character (double quote)
instead of ' (single quote) in php/html-scripts.

Much easier is:
function admin_menu() {
   echo " Meny ";
   echo "Medlemmar";
.
You do then not have to worry about all backslashes.
And single quote is w3c html-standard just as double quote.
And it?s faster - you do not have to switch between html and php so often.

/Håkan



"Anders Thoresson" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Which is more efficient:
>
> function admin_menu() {
>   echo " Meny ";
>   echo "Medlemmar";
>   echo "Album";
>   echo "Huvudmeny";
>   echo "Logga ut";
> }
>
> or
>
> function admin_menu() {
>   ?>
>Meny 
>   Medlemmar
>   Album
>   Huvudmeny
>   Logga
> ut
>}
>
> Any reasons other than speed to choose either?
>
> --
> anders thoresson



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




Re: [PHP] Re: jumping between php and html or using echo for printing html-tags.

2003-02-10 Thread Askengren
Great
Thanks a lot!
/Håkan


"Marek Kilimajer" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Then why not use single quotes, its faster than double quotes, and you
> could also use comma instead of full stop (echo can take multiple
> parameters,
> which is faster than building up a new string)
>
> function admin_menu() {
>echo ' Meny ';
>echo 'Medlemmar';
>
>
>
> Askengren wrote:
>
> >I do not know why so many developers use the "-character (double quote)
> >instead of ' (single quote) in php/html-scripts.
> >
> >Much easier is:
> >function admin_menu() {
> >   echo " Meny ";
> >   echo "Medlemmar";
> >.
> >You do then not have to worry about all backslashes.
> >And single quote is w3c html-standard just as double quote.
> >And it?s faster - you do not have to switch between html and php so
often.
> >
> >/Håkan
> >
> >
> >
> >"Anders Thoresson" <[EMAIL PROTECTED]> skrev i meddelandet
> >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> >
> >>Which is more efficient:
> >>
> >>function admin_menu() {
> >>  echo " Meny ";
> >>  echo "Medlemmar";
> >>  echo "Album";
> >>  echo "Huvudmeny";
> >>  echo "Logga ut";
> >>}
> >>
> >>or
> >>
> >>function admin_menu() {
> >>  ?>
> >>   Meny 
> >>  Medlemmar
> >>  Album
> >>  Huvudmeny
> >>  Logga
> >>ut
> >>   >>}
> >>
> >>Any reasons other than speed to choose either?
> >>
> >>--
> >>anders thoresson
> >>
> >>
> >
> >
> >
> >
> >
>



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




[PHP] Store/Retrieve Word Documents in MySQL/PHP?

2002-06-11 Thread Håkan Askengren

Hi
I have managed to load images to database through php, but what about other
file types as MS Word (yes I dare to mention it here...)
What headers etcetera are needed?
Does somebody have any examples?

Håkan Askengren



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




Re: [PHP] Store/Retrieve Word Documents in MySQL/PHP?

2002-06-12 Thread Håkan Askengren

Super
Thanks a lot.
/Håkan

"Miguel Cruz" <[EMAIL PROTECTED]> skrev i meddelandet
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I usually just grep through the one that comes with Apache; it's fairly
> thorough. You might find it in /usr/local/apache/conf/mime.types
>



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




SV: [PHP] password()

2001-01-19 Thread Håkan Askengren

For me it´s plain text in Mysql table.
In a project with < 500 users it is easy to
to read forgotten passwords... Instead of giving away a new.
/Håkan

"Chris Lee" <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:9409fm$mg$[EMAIL PROTECTED]
> Im curious to see how other php developers store their passwd's
> -plain text in db
> -use of unix password()
> -use of db password()
> -other ?
>
> Chris Lee
> Mediawaveonline.com
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP] Cookies still store old value(Help!!)

2001-01-19 Thread Håkan Askengren

Hi
I have got a similar problem with session handling. As session handling is
handled
by cookies this should be the same problem.

I handle (as Hendry in a similar way does) user right with session handling.
IE ver 5 is no problem. I can have as many session (browers) running as I
want. All session id
are different.
The Netscape sessions however (I have tested on ver 4.51) seems to share the
same
cookie. The different browser-sessions (yes, on the same computer...) are
handled as _one_ session
by php-session handling.

And hence user B is getting the rights of user A as Hendry descibes it, if
user A has logged on before user B in a different browser. The session is
released however
when all browser-sessions have exited.

Is this a bug in Netscape or php-handling?

best regards
Håkan


"Hendry Sumilo" <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
> Dear Expert,
>
> I have to store user detail and password in the cookies so that i can
detect
> if particular user is allowed to enter certain website
> Example is like this:
>
> User "A" is allowed to enter student page
> User "B" is allowed to enter lecturer page
>
> Both have to enter password with login at login page
>
> When User "A" enter ,the cookies will store User "A" name,when he enters
the
> lecturer page,he will be directed to login page again(because he is not
> allowed to enter lecturer page) and so do User "B".
> BUT THE PROBLEM HAPPENS LIKE THIS:
> When User "A" enters ,and then User "B" enters,User "B" CAN ENTER THE
> STUDENT PAGE AND THE COOKIES STORE USER USER "A" VALUE.BUT WHEN I REFRESH
IT
> ,THE COOKIES WILL STORE NOTHING AND REDIRECT TO LOGIN PAGE.
> Can i know what the problem is?
>
> Thank you very much,it is really annoying me because someone can enter
other
> page if other has used that before
>
>
> Sincerely Yours
>
> Hendry Sumilo
> [EMAIL PROTECTED]
> http://members.tripodasia.com.my/hsumilo
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP] session_destroy

2001-01-19 Thread Håkan Askengren

I always call unset before destroy. Worked fine when I had problems with
destroy.



/Håkan


Brandon Orther <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:CKEMJEADMOCEHPHJKLPAGEGLCDAA.brandon@webintelle
cts.com...
> Hello Everyone,
>
> Can someone please give me example code on how to use session_destroy
> because I can not get it to work.  Also if you have an example for
> gc_probability I would love that too. Thank You :)
>
> Thank you,
>
> 
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> 
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Get the row number in php-script?

2001-09-16 Thread Håkan Askengren

Hi
Does anybody know how to get hold of the rownumber of the current row in a
php-script?
(Rownumber in the actual file.)

Thanks
/Håkan



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]