How to pull username who submited my form

Lek 20 Nov, 2008
Hi

Thank you for amazing component.
I need some help. Could someone advice me, how to bring the username who submited my form to show in my connecticity table.
Max_admin 20 Nov, 2008
Hi Lek,

do this:

<?php
$user = JRequest::getUser();
echo $user->id;

?>


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Lek 20 Nov, 2008
Hi Max

Sorry that I have nothing php knowledge. Please kindly tell me more, where I must fill this code.
(I try to fill in body and got fatal error)
Max_admin 20 Nov, 2008
Hi Lek,

sorry there was a mistake, it should be :

    <?php
    $user = JFactory::getUser();
    echo $user->id;

    ?>


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Lek 21 Nov, 2008
Hi Max

Thank you for your help!😀

With you code, I can pull username who login the moment,
when another login it show their username in every raw data. :?

However, I use this code in textbox(type = hidden) of chronoform to echo username (who login a moment) like a auto fill and then submit, send username data to database. that work with I need.

Anyway, I think it have another way that easier than my method..
Max_admin 21 Nov, 2008
Hi Lek, Can't understand it well, this solved your problem or you still have some issue ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Lek 21 Nov, 2008
Hi Max

That work. Great support😀
This topic is locked and no more replies can be posted.