Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can i get login details to a table?

New Here ,
Nov 21, 2007 Nov 21, 2007
i am using my sql data base.people who are visiing my web site can log in to the sites restricted areas using their Usernames and Passwords. (the login is based on the "Register" table in the data base)

When somebody enteres the site using their Username and Password, and inputs new data to anothertable (classified table), How can the classified table get the login Username to one of its columns. (automatically Username of the user is added to the table)

how can i do that. A coding for that would e perfect. please help me. i would be really greatful to you.

thanks

sisira
TOPICS
Server side applications
221
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2007 Nov 22, 2007
LATEST
Sisira,

When you add the record to your table, include the UserID as one of the
values. Just assign the current Username to a variable and include that in
your SQL statement. (How you do this will depend on the scripting language
that you are using)

UserVariable = <set this from your login session>

INSERT INTO anothertable (Field1, Field2, Username)
VALUES (value1, value2, UserVariable)

Does this make sense? If not, send me your page and I'll have a look at it.
Please Zip the file first.

HTH

Steve

"univicontrads@yahoo.com" <webforumsuser@macromedia.com> wrote in message
news:fi2kvl$4or$1@forums.macromedia.com...
>i am using my sql data base.people who are visiing my web site can log in
>to
> the sites restricted areas using their Usernames and Passwords. (the login
> is
> based on the "Register" table in the data base)
>
> When somebody enteres the site using their Username and Password, and
> inputs
> new data to anothertable (classified table), How can the classified table
> get
> the login Username to one of its columns. (automatically Username of the
> user
> is added to the table)
>
> how can i do that. A coding for that would e perfect. please help me. i
> would
> be really greatful to you.
>
> thanks
>
> sisira
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines