Hello every one🙂
I am trying to develop a Pledge area on my sons school website which is non profit which is in Joomla
Ok we have a program each year which is a Golf tournament each Golfer goes out and gets pledges what they want is to have the Golfers login and track there own pledges but have a admin able to sign in and see all pledges.
i have created a table in the Joomla data base called jos_pledges
fields ==
id , firstname , lastname , street , city, state , phone , email , pledgeamount , userid
the userid -field is the person that is loged in createing the pledge ??
I am not a data base programer and new to alot of this
am i on the right path or way Off ??? please help
I am trying to develop a Pledge area on my sons school website which is non profit which is in Joomla
Ok we have a program each year which is a Golf tournament each Golfer goes out and gets pledges what they want is to have the Golfers login and track there own pledges but have a admin able to sign in and see all pledges.
i have created a table in the Joomla data base called jos_pledges
fields ==
id , firstname , lastname , street , city, state , phone , email , pledgeamount , userid
the userid -field is the person that is loged in createing the pledge ??
I am not a data base programer and new to alot of this
am i on the right path or way Off ??? please help
Bob,
Thank you for responding i have read some of the stuff on here from you. Great stuff !
I hope this make since what i am going to write.
say i login and i go to the area to in put my pledge info how would i get the user id field populated with the logged in user.
does joomla use $session or $cookie to trap the logged in user ??
so i login goto the form fill in all the pledge info hit submit it populates the data base i know i would have to create a hidden field and populate it with the $session varible ??? i think
Thanks dan
Thank you for responding i have read some of the stuff on here from you. Great stuff !
I hope this make since what i am going to write.
say i login and i go to the area to in put my pledge info how would i get the user id field populated with the logged in user.
does joomla use $session or $cookie to trap the logged in user ??
so i login goto the form fill in all the pledge info hit submit it populates the data base i know i would have to create a hidden field and populate it with the $session varible ??? i think
Thanks dan
Hi dan,
The current user is always available as a user object:
Bob
PS It is also in the session but why bother.
The current user is always available as a user object:
<?php
$user =& JFactory::getUser();
echo $user->id;
echo $user->name;
. . .
?>
That's by far the easiest way of accessing it.Bob
PS It is also in the session but why bother.
lol i just found the same info🙂 thanks so much
i tried to create a new artical and place the code in it does not give the ability for php code ???
i tried to create a new artical and place the code in it does not give the ability for php code ???
Hi dan,
No, normal Joomla articles do not take PHP - just HTML/CSS. Mostly that's for security reasons.
Bob
No, normal Joomla articles do not take PHP - just HTML/CSS. Mostly that's for security reasons.
Bob
This topic is locked and no more replies can be posted.