|
|
Viewing Topic: User-Specific
Pages |
Guest |
Subject: "User-Specific
Pages"
Posted: @ 10:23 pm on Mar 20 2006 |
|
|
Unregistered
|
I am reasonably
new to PHP and
MySQL, and I
was wondering
how I would go
about
redirecting
people who
login to my
site to their
specific page,
with their
specific data.
I intend to
have tutorials
on the site
available to
people who have
ordered the
services
related to the
tutorials. The
problem is, I
want people to
only be able to
view the
tutorials which
they have
purchased, etc.
Is there a way
to redirect
them to a
user-specific
page after
login? Thanks
|
Viewed: 12,909 Times | |  |
bs0d |
Subject: "re:
User-Specific
Pages"
Posted: @ 11:31 pm on Mar 20 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,510) Since: 02/06/05 Posts: 604 From: USA
|
yea, check out
the Creating A
Members System
Tutorial -
Login
Code
.
What you can do
just redirect
them to the
tutorials url
instead of
redirecting
them to the
main page.
then, on your
tutorials page
run a query to
display only
tutorials by
that username
stored in the
session
variable:
$_SESSION['use
rname']
Add a column to
your members
table to store
an array of
tutorial id's
they have
purchased. Then
on your
tutorials page
echo them out
for the signed
in member. see
what i mean?
|
Viewed: 12,901 Times | |  |
Guest |
Subject: "re:
User-Specific
Pages"
Posted: @ 2:54 pm on Mar 21 2006
|
|
|
Unregistered
|
Oh man! Is
that ever easy!
Here I've
been, racking
my brain trying
to think of a
way to get this
to work, and
there it is!
Fantastic.
Thank you. So
I would just
need to verify
the session on
the tutorial
page and, if
the session
exists, echo
the tutorial
links via a sql
query to the
array on the
table
specifying
which ones are
available per
that user,
right? I for
some reason had
skipped over
the ability to
store arrays in
tables. Thanks
again!
|
Viewed: 12,890 Times | |  |
misterhaan |
Subject: "re:
User-Specific
Pages"
Posted: @ 3:23 pm on Mar 21 2006
|
|
|
 Member #: 5 Rank: Contributor - (214) Since: 02/11/05 Posts: 149 From: chair
|
speaking of
storing arrays
in tables, is
there a better
way than using
php implode()
to turn it into
a string and
store that in a
varchar? i've
been either
doing that
(like once or
so) or creating
a separate
table just for
linking two
other tables
(with two
fields --
table1id and
table2id)
please note
that the above
post is likely
made up in its
entirety. |
Viewed: 12,883 Times | |  |
bs0d |
Subject: "re:
User-Specific
Pages"
Posted: @ 8:07 pm on Mar 21 2006
|
|
|
 Member #: 1 Rank: Admin. - (1,510) Since: 02/06/05 Posts: 604 From: USA
|
mister
haan
said... <
i>creating
a separate
table just for
linking two
other tables
(with two
fields --
table1id and
table2id)
^^ That would
probably be the
easiest way. Im
no expert, but
it might come
down to how
many records or
"id's&q
uot; you're
gonna be
working with as
to what method
is best?
|
Viewed: 12,878 Times | |  |
David1159 |
Subject: "re:
User-Specific
Pages"
Posted: @ 4:18 am on Jun 24 2009
|
|
|
 Member #: 526 Rank: user - (81) Since: 12/27/07 Posts: 81 From: usa
|
Just curious,
good discussion
too.
What if you
need it to be
dynamic? You
have no set
size of the
array, you do
not know how
many tables
would be
needed.
Can't you save
a object to the
database if you
serialize it?
I haven't
tried it in php
though only
java.
Coding is
simply CST...
Combining $hit
Together. We
make different
$hit to run in
unison
correctly. |
Viewed: 9,786 Times | |  |
Viewing Page: 1 of 1 |
|
|
|