|
|
Viewing Topic: comment script
and registered
users |
skoda1203 |
Subject: "comment script
and registered
users"
Posted: @ 10:09 am on Jun 29 2011 |
|
|
Member #: 1394 Rank: user - (3) Since: 06/29/11 Posts: 3
|
Hello,
I have a
registration
only page. I
already have
working
registration
for members but
it is not made
by your
tutorial. How
can I change
your comment
script (which
is great) so
users don't
need to fill
name and
contact
information? If
you could just
point me to the
right direction
I would be very
grateful.
Thank you very
much and sorry
for my english.
|
Viewed: 28,575 Times | |  |
bs0d |
Subject: "re: comment
script and
registered
u..."
Posted: @ 11:45 am on Jun 29 2011
|
|
|
 Member #: 1 Rank: Admin. - (1,510) Since: 02/06/05 Posts: 604 From: USA
|
Just remove
everything in
the script that
checks for
name, checks
for contact,
and delete the
display in the
form and output
for name and
contact. Also
the same in the
table design
and query where
the appropriate
values are
added.
|
Viewed: 28,564 Times | |  |
skoda1203 |
Subject: "re: comment
script and
registered
u..."
Posted: @ 2:08 pm on Jun 29 2011
|
|
|
Member #: 1394 Rank: user - (3) Since: 06/29/11 Posts: 3
|
Thank you very
much for your
reply. It works
great except I
can't see who
posted the
comment. I will
try to work it
out somehow.
Thank you again
for your help
and work you
have done
writing the
script and
helping
everyone on the
forums.
|
Viewed: 28,560 Times | |  |
bs0d |
Subject: "re: comment
script and
registered
u..."
Posted: @ 5:13 pm on Jun 29 2011
|
|
|
 Member #: 1 Rank: Admin. - (1,510) Since: 02/06/05 Posts: 604 From: USA
|
I may have
misunderstood
your email. If
you did what I
told you, then
it won't even
factor in
username or
contact data
whatsoever.
I bet you
wanted it to
enter in their
username if
they're
already signed
in. To do that,
if you're
storing
usernames in
sessions when
they login,
then just set
the value to
$_SESSION['var
iable_of_your_u
sername_here']
;
same goes for
contact data.
|
Viewed: 28,548 Times | |  |
skoda1203 |
Subject: "re: comment
script and
registered
u..."
Posted: @ 7:07 am on Jun 30 2011
|
|
|
Member #: 1394 Rank: user - (3) Since: 06/29/11 Posts: 3
|
I works exactly
how I want it
to. I can't
believe how
easy that was.
Thank you
again.
|
Viewed: 28,528 Times | |  |
tony |
Subject: "re:commentscrip
tandregisteredu
ser..."
Posted: @ 4:23 am on Sep 13 2011
|
|
|
Member #: 1411 Rank: user - (1) Since: 09/12/11 Posts: 1
|
hi guys, im
having same
problem ...
when i add
comment
doesn't show
the
username,shows
just blank
where do i have
to add
$_SESSION['var
iable_of_your_u
sername_here']
;
can u be a
litle more
specific
thnxx
Edited at 04:32:59 am on 09/13/11
|
Viewed: 27,572 Times | |  |
bs0d |
Subject: "re:
commentscript
and registered
us..."
Posted: @ 12:19 am on Sep 14 2011
|
|
|
 Member #: 1 Rank: Admin. - (1,510) Since: 02/06/05 Posts: 604 From: USA
|
You need to be
more specific
about what
we're dealing
with here. Are
you trying to
post as a
person via
session (where
someone is
already logged
in to the
site), or
simply allow a
user to type in
their name?
Either way,
that name
should be
passed to the
database and
stored in the
table with the
comment. So
using
phpMyAdmin
perhaps, I
would browse
the table and
see if the
usernames are
being stored.
This is of
course assuming
that you setup
the table to
accept
usernames, and
added the
functionality
to the script
to add the
username.
So if you're
using a member
system and the
username for
the comment
should be
auto-populated
if a $_SESSION
variable exists
for a username,
then you might
want to check
out the Members
System
tutorial, more
specifically
[link=http://ww
w.allsyntax.com
/tutorials/PHP/
26/Complete-Mem
bers-System/6.p
hp] creating a
login
script[/link]
and ensure the
user is being
logged in and
the SESSION
vars set.
Otherwise (you
want a user to
type in a name)
then ensure
your $_POST
variable for
the username is
being set and
contains a
value. Maybe
you're not
referencing it
properly when
you check for
it? This would
be determined
by your form
element name of
the field where
a user should
enter their
name.
Edited at 12:26:13 am on 09/14/11
|
Viewed: 27,536 Times | |  |
Viewing Page: 1 of 1 |
|
|
|