Buy Now
Sign in

Joomla Non profit school site

r2ks , April 02 2009, 13:54
R
r2ks 8
April 02 2009, 13:54 #28578
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
GreyHead 64
April 02 2009, 14:58 #28585
Hi r2ks,

Looks good to me

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
R
r2ks 8
April 02 2009, 17:46 #28623
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
GreyHead 64
April 02 2009, 17:52 #28625
Hi dan,

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.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
R
r2ks 8
April 02 2009, 19:29 #28629
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 ???
GreyHead 64
April 02 2009, 21:13 #28634
Hi dan,

No, normal Joomla articles do not take PHP - just HTML/CSS. Mostly that's for security reasons.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
R
r2ks 8
April 03 2009, 00:08 #28676
Bob,
this is interesting i noticed that i can use PhP in chrono forms,
Again thanks for your Help i am working on that form Page right know.
Dan