Hi Everyone,
I'm attempting to figure out the proper way to use sessions to log
someone into my system. The idea being, if they arn't logged in all
they can see is the login form, and if they are logged in, they and
have access to a database of addresses.
I think I understand how to start
On 8/24/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I'm attempting to figure out the proper way to use sessions to log
> someone into my system. The idea being, if they arn't logged in all
> they can see is the login form, and if they are logged in, they and
> have access to a dat
Daniel Brown schreef:
Keep in mind that, as always, this hasn't been bug-checked,
re-read, or otherwise validated.
A warrant about your example not being validated, will most likely not
stop the OP from using this code as is, thereby subjecting himself to
SQL injection.
And all it nee
On 8/24/07, Borokov Smith <[EMAIL PROTECTED]> wrote:
[snip]
> A warrant about your example not being validated, will most likely not
> stop the OP from using this code as is, thereby subjecting himself to
> SQL injection.
> And all it needed was mysql_real_escape_string() in there.
>
>
Kinda' like
Daniel Brown schreef:
On 8/24/07, Borokov Smith <[EMAIL PROTECTED]> wrote:
[snip]
A warrant about your example not being validated, will most likely not
stop the OP from using this code as is, thereby subjecting himself to
SQL injection.
And all it needed was mysql_real_escape_string() in the
On 8/24/07, Borokov Smith <[EMAIL PROTECTED]> wrote:
> Daniel Brown schreef:
> > On 8/24/07, Borokov Smith <[EMAIL PROTECTED]> wrote:
> > [snip]
> >
> >> A warrant about your example not being validated, will most likely not
> >> stop the OP from using this code as is, thereby subjecting himself to
On Fri, August 24, 2007 11:03 am, Jason Pruim wrote:
> Hi Everyone,
>
> I'm attempting to figure out the proper way to use sessions to log
> someone into my system. The idea being, if they arn't logged in all
> they can see is the login form, and if they are logged in, they and
> have access to a d
On Aug 24, 2007, at 12:15 PM, Daniel Brown wrote:
On 8/24/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
Hi Everyone,
I'm attempting to figure out the proper way to use sessions to log
someone into my system. The idea being, if they arn't logged in all
they can see is the login form, and if they
On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
>
> On Aug 28, 2007, at 10:03 AM, Daniel Brown wrote:
>
> > On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> > [snip]
> >>> $sql = "SELECT * FROM users WHERE user='".$user."' AND
> >>> pass='".$pass."' LIMIT 0,1;";
> >>> $result
On Aug 28, 2007, at 10:03 AM, Daniel Brown wrote:
On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
[snip]
$sql = "SELECT * FROM users WHERE user='".$user."' AND
pass='".$pass."' LIMIT 0,1;";
$result = mysql_query($sql) or die("Wrong data supplied or
database error");
On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
[snip]
> > $sql = "SELECT * FROM users WHERE user='".$user."' AND
> > pass='".$pass."' LIMIT 0,1;";
> > $result = mysql_query($sql) or die("Wrong data supplied or
> > database error");
> > while($row = mysql_fetch_array($res
On Aug 28, 2007, at 10:21 AM, Daniel Brown wrote:
On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
On Aug 28, 2007, at 10:03 AM, Daniel Brown wrote:
On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
[snip]
$sql = "SELECT * FROM users WHERE user='".$user."' AND
pass='".$pass."' L
Jason Pruim wrote:
One other question, to logout, can I just call a file that has
session_destroy() and a header("Location: ???"); in it? Or should I do
something else for logging out?
foreach (array_keys($_SESSION) as $key)
unset($_SESSION[$key];
session_destroy();
-Stut
--
http://stut.
On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
>
> On Aug 28, 2007, at 10:21 AM, Daniel Brown wrote:
>
> > On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >>
> >> On Aug 28, 2007, at 10:03 AM, Daniel Brown wrote:
> >>
> >>> On 8/28/07, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >>> [snip]
>
On 28 August 2007 15:56, Stut wrote:
> Jason Pruim wrote:
> > One other question, to logout, can I just call a file that has
> > session_destroy() and a header("Location: ???"); in it? Or should I
> > do something else for logging out?
>
> foreach (array_keys($_SESSION) as $key)
> unset($_SE
Ford, Mike wrote:
> On 28 August 2007 15:56, Stut wrote:
>
>> Jason Pruim wrote:
>>> One other question, to logout, can I just call a file that has
>>> session_destroy() and a header("Location: ???"); in it? Or should I
>>> do something else for logging out?
>> foreach (array_keys($_SESSION) as $k
16 matches
Mail list logo