How do I save the User ID along with the form's data? I thought the "uid" field was that, but apparently that is some kind of unique hash created with each entry. Is there something special I need to include in the form or some setting I need to toggle to say that the form's data must be saved with the user id? Or do I need to put in a block of PHP code into the form and then echo out a hidden field to store it in?
Forums
Saving User ID with form data
Hi kokuryu,
In Joomla 1.0.x you can use the $my object to get user data. You'd need to put code something like this:
<?php
global $my;
<input type="hidden" value="<?php echo $my->id; ?>: />
?>
Joomla 1.5 code is slightly different and I can't remember it right now.
Bob
In Joomla 1.0.x you can use the $my object to get user data. You'd need to put code something like this:
<?php
global $my;
<input type="hidden" value="<?php echo $my->id; ?>: />
?>
Joomla 1.5 code is slightly different and I can't remember it right now.
Bob
Thanks a bunch! That worked great!
I tried to post the code I used, but it came out all gabaged and half missing...
I tried to post the code I used, but it came out all gabaged and half missing...
This topic is locked and no more replies can be posted.