On 10 Mar 2004 Henry Grech-Cini wrote:
> My question is are there problems with:
>
> header("Location: ".$url[$index]);
> ?>
As long as no other headers have been sent that should work fine.
Location: is the standard method for redirection -- I'm not aware of
any circumstances in which it wo
On 10 Mar 2004 Robert Cummings wrote:
> Overhead is minimal since PHP doesn't actually copy the contents of the
> container until an attempt to modify it is made. At which time the
> contents are only actually copied if the internal reference count is
> greater than 0. Generally this means it won'
On 10 Mar 2004 dmesg wrote:
> How can i tell fsockopen() to skip to echo this warnings?
Here's a repeat of something I just posted the other day on this ...
Here's an approach I have used to avoid any error messages at all --
presumably you could also set a flag in the error handler to indicate
On 9 Mar 2004 Richard Davey wrote:
> $x ? xxx : xxx
>
> But it makes your code less readable IMHO and offers no tangible
> benefit whatsoever.
Ah, to each his/her own I guess ... I actually find:
$value = ($condition ? $val1 : $val2);
easier to read than:
if ($condition)
On 8 Mar 2004 Adam Reiswig wrote:
> Normally, the two emails would end up in the same pop account but don't
> seem to be when I use the above script. If I send to one or the other
> they receive appropriately, but if I send to both at the same time, I
> only receive one email, not both. If anyon
On 8 Mar 2004 Tim Traver wrote:
> I sent a new session ID with the link to the new window like this :
>
>
>
> but all it does is change the current session id to the new one, so if I go
> back to the main window, it carries the new session into it.
I think this is trickier than it sounds. Ca
On 8 Mar 2004 Phil Ewington - 43 Plc wrote:
> Can anyone tell me the best way to avoid errors using fsockopen(). I have
> tried wrapping the function call in a conditional statement, and have also
> tried calling the function and then testing the return.
Here's an approach I have used to avoid an
> > Shouldn't unset($_SESSION) work?
>
> No. The following Caution appears in the manual (at
> http://www.php.net/manual/en/ref.session.php#session.examples):
>
> Caution Do NOT unset the whole $_SESSION with unset($_SESSION) as
> this will disable the registering of session variables through t
On 27 Jan 2004 Stuart wrote:
> In that case, try this...
>
> foreach (array_keys($_SESSION) as $key)
> unset($_SESSION[$key]);
Yes, I had tried that but forgot to mention it. It does work.
However, I'm still mystified as to why unset($_SESSION) not only
doesn't remove old data from the s
On 27 Jan 2004 Stuart wrote:
> > I am trying to find a reliable method to clean out all session
> > variables and start clean.
>
> http://php.net/session_destroy
That destroys the file but (at least the docs say) does not clean out
the global variables, and does not seem to work in my example.
I am trying to find a reliable method to clean out all session
variables and start clean.
Running PHP 4.3.1 on Win2K developing a web app to run on Linux.
Session cookies are enabled, register globals is off. I access all
session variables with $_SESSION.
What I have found is that if I use u
On 3 Apr 2003 CPT John W. Holmes wrote:
> No, $varname isn't created. You don't need it. You have a variable called
> $_SESSION['varname'], just use that where ever you need it (even within
> functions). If register_globals is on, you should be using the
> session_register() method, anyhow, not th
How does one delete an object? For example:
$object = new Class(...);
.
$object = new Class(...);
I want to throw away the old object and create a new, freshly
initialized one using the same variable. Is the above adequate or will
this orphan the first object? If
On 22 Mar 2003 David Otton wrote:
> The thing that is most likely to trip you up is people who cut'n'paste
> from Word. High-ASCII characters can slip in like that, also some
> characters that are common in European languages (accents and umlauts).
> All of these need to be translated into HTML en
On 23 Mar 2003 Justin French wrote:
> That's in the user notes... ignor it... md5() does not have to be salted...
> infact, you WANT the md5() to be static... because you will compare the
> md5()'d password in the database with the md5()'d password that they submit
> on a form.
Exactly. On this
On 23 Mar 2003 Justin French wrote:
> I just md5() the passwords, and reset them if needed... rather than
> retrieving. The advantage for me on this is that it's portable... md5() is
> part of the base PHP install, whereas the mcrypt stuff isn't (or wasn't).
Something like that was my inclinatio
I am trying to build password authentication into a database front end
for a MySQL DB. I find the php docs on this point quite confusing so I
have a lot of questions.
I can use a one-way hash to do this if that's the best way, as I don't
need to retrieve the password. However if I could do so
I have a class for elements of an HTML form and a bunch of subclasses
for text box, radio, etc.
I need some utility functions which will be called by some of the
subclass implementations. These are utilities used within the class
only, they are not methods.
Is there a "best" way to implement
101 - 118 of 118 matches
Mail list logo