Hi, i have a "custom code" to find the user id, the code is
Now I want to display in a textbox an associated number. the numbers and accounts to be associated are 30.
example
id = 650 numer 4000
id = 651 numer 4050
any suggestions ? thanks
<?php
$user = JFactory::getUser();
$form->data['codiceca'] = $user->id;
?>
Now I want to display in a textbox an associated number. the numbers and accounts to be associated are 30.
example
id = 650 numer 4000
id = 651 numer 4050
any suggestions ? thanks
Hi agostino87,
Something like this?
Bob
Something like this?
<?php
$juser = \JFactory::getUser();
$id = $juser->id;
$form->data['codiceca'] = $id * 30;
?>
Bob
thanks greyhead,
not exactly, this code multiplies by 30 the user id
I rather want to associate with the number id a fixed number
then the code is
But I want to add 30 combinations
example
id = 4000 number 50
id = 4350 number 51
I do not know how to put the condition if user id is 4000 enter the numer 50, if user id is 4350 then enter 51, etc ...
not exactly, this code multiplies by 30 the user id
I rather want to associate with the number id a fixed number
then the code is
<?php
$juser = \JFactory::getUser();
$id = $juser->id;
$form->data['codiceca'] = $id = 30;
?>
But I want to add 30 combinations
example
id = 4000 number 50
id = 4350 number 51
I do not know how to put the condition if user id is 4000 enter the numer 50, if user id is 4350 then enter 51, etc ...
This topic is locked and no more replies can be posted.