I am doing a site where some of the pages will show various hours of
some businesses.
To make life easier for searching for open businesses PER DAY, I have
pretty much decided to make an arbitrary dat-to-day boundary, instead of
the usual midnight boundary. Some businesses that this applies to
Hi,
I need to manipulate a string to insert a space 3 characters from the
right end.
eg: turn 'ng23fgh' into 'ng23 fgh', or 'hfdgskfjgh23kj' into
'hfdgskfjgh2 3kj'.
Any help gratefully received.
Matt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/
>
> foreach($newlines as $newline) {
>
> #how do I get the index of the array each time $newline is printed out?
>
> echo ??;
> }
foreach($newlines as $id=>$newline){
echo $id.''.$newline;
}
read the documentation
http://us3.php.net/manual/en/control-structures.foreach.php
--
PHP Gener
foreach($newlines as $newline) {
#how do I get the index of the array each time $newline is printed out?
echo ??;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Justin French propably said:
> In order to set and then check a cookie, you need to go through a
> page... so you'd have to set something in the URL like ?cookieset=1
> anyway, in order to knwo you had set it, in order to check it.
>
> In other words, you'll need some guff in the URL, in order f
In order to set and then check a cookie, you need to go through a page... so
you'd have to set something in the URL like ?cookieset=1 anyway, in order to
knwo you had set it, in order to check it.
In other words, you'll need some guff in the URL, in order for it to all
work, so why not let it be
Justin French propably said:
> You'd loose session for those without cookies. The work around for
> this would be to hard-code the session ID to all URLs across your
> site for all pages you wish to carry a session through -- a real pain.
Indeed.
> It HAS TO use a session ID from the first pag
On Tue, 1 Oct 2002 12:06:04 +0200, Daniel Alsn wrote:
>To reply to myself .)
>
>I disabled trans_sid on the actual site by using:
>
>ini_set('session.use_trans_sid',false);
>session_start();
>
>But i still want to know what trans_sid does for me. What am i missing out
>on when not using it?
>
>-
on 01/10/02 7:45 PM, Daniel Alsén ([EMAIL PROTECTED]) wrote:
> John W. Holmes propably said:
>
>> Do you have a session_start() on the page? It looks like you have a
>> trans_sid enabled. PHP will add that to all of your URLs
>> automatically. Can you disable it in php.ini?
>
> Yes trans_sid is
To reply to myself .)
I disabled trans_sid on the actual site by using:
ini_set('session.use_trans_sid',false);
session_start();
But i still want to know what trans_sid does for me. What am i missing out
on when not using it?
- D, loves google
--
PHP General Mailing List (http://www.php.n
John W. Holmes propably said:
> Do you have a session_start() on the page? It looks like you have a
> trans_sid enabled. PHP will add that to all of your URLs
> automatically. Can you disable it in php.ini?
Yes trans_sid is enabled and i have a session_start on the page. What is
trans_sid doing
> Another thing - the first time the page is loaded every link on the
page
> gets a '?PHPSESSID=...etc...' attached to itself. But only the first
time.
> It dissapears after the first click i make.
Do you have a session_start() on the page? It looks like you have a
trans_sid enabled. PHP will add
Thanks guys! That did the trick. Time to study these sessions a bit more
thourough it seems :)
Another thing - the first time the page is loaded every link on the page
gets a '?PHPSESSID=...etc...' attached to itself. But only the first time.
It dissapears after the first click i make.
I've neve
Your session variable overwrites the get variable, use $newlang
session_start();
session_register("lang");
if(isset($newlang) $lang=$newlang; // check here for valid values
if (!isset($lang)) { $lang = 'se'; }
Daniel Alsén wrote:
>John W. Holmes propably said:
>
>
>
>>Is register globals on
> John W. Holmes propably said:
>
> > Is register globals on or off?
>
> On.
>
> Now - without doing anything - i managed to change the value of $lang
to
> 'en' with a link (pagesname.php?lang=en). But i can't change it back
with
> ?lang=se. Should i get someting to eat to get my brain working?
John W. Holmes propably said:
> Is register globals on or off?
On.
Now - without doing anything - i managed to change the value of $lang to
'en' with a link (pagesname.php?lang=en). But i can't change it back with
?lang=se. Should i get someting to eat to get my brain working?
- D
--
PHP
Is register globals on or off?
---John Holmes...
> -Original Message-
> From: Daniel Alsén [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 30, 2002 12:19 PM
> To: php general
> Subject: [PHP] Quickie
>
> Guys,
>
> i've been away for a while - en
Guys,
i've been away for a while - enjoying a much needed vacation in lovely
Hungary and expanding my company. Now im back to bother you with easy
questions ;)
I am doing a small site multilingual and will display different content
depending on what language the user choses. When the user comes
Read chapter: LXXVIII. Session handling functions
Niklas
-Original Message-
From: Peter [mailto:[EMAIL PROTECTED]]
Sent: 22. syyskuuta 2001 8:19
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Quickie
Hi,
I am trying to redirect the user to another page after user
Hi,
I am trying to redirect the user to another page after user authentication
and using sessions.
I was wondering how do you redirect to another page and then at the same
use pass the session ID over to that other page.
Thanks.
Peter
On Fri, 21 Sep 2001, [iso-8859-1] Stig-Ørjan Smelror wrote
> If nothing is beeing sent to output on the page then use header() else
> you need to use javascript.
>
>
> Niklas
>
if headers are sent.
Use header( "Location: file.php" ), as noted earlier, if no headers are sent.
--
Stig-Ørjan Smelror
Systemutvikler
Linux Communications AS
Sandakerv
If nothing is beeing sent to output on the page then use header() else you
need to use javascript.
Niklas
-Original Message-
From: Daniel Alsén [mailto:[EMAIL PROTECTED]]
Sent: 21. syyskuuta 2001 15:51
To: php
Subject: [PHP] Quickie
How do i send the user on to another page at the
How do i send the user on to another page at the end of the execution of a
script?
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
23 matches
Mail list logo