Login     Sign up
Get Current Username?
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

I am in the process of creating a module page for my site which involves a form for the users to submit. Upon entering the submit button I also want to capture and store in the database the user that actually submitted the form via their client id and or username. I was wondering if anyone know how this can be done.

Thanks

172 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

[code]
<form method="post" action="'.url('modulename/function_after_submit/'.$client['id']).'" >
[/code]

172 months ago
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Thanks falcone however what I am trying to do is take the current user that is logged in and store their username or userid into a variable called say userId and store that information in my database along with any other form information that they submit. So I guess I am basically trying to figure out a way to get and store a user's name once they are logged in.

172 months ago