wuchuanbin / php-calendar

Automatically exported from code.google.com/p/php-calendar
0 stars 0 forks source link

Help with reading DB items into variables to show "Who Is Logged In" #119

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Just want to say that I am new a php programming and struggling with some 
items.  I have been able to add 3 new fields to the 'users' table (first, last 
and email) in order to setup emailing to a group of users which is working, 
using hard coded email addresses at this point.  I also have a form modified to 
allow changing this new data.

I can display the entire user table on a new form, but struggling to read table 
data (such as 'username' or 'email address') into variables that can be passed 
to other forms.  I want to be able to say "Welcome Bill" when Bill is logged 
in, that has been read from the DB verses my hard coded case from EID 
reference.  Another item would be to read the "author" of an event into a 
variable that I can include in an email notification.

Any help would be appreciated. This is a great open source project, thank you 
to all the contributors!

Bill

Original issue reported on code.google.com by covene...@gmail.com on 14 Feb 2013 at 12:00

GoogleCodeExporter commented 8 years ago
"I want to be able to say "Welcome Bill" when Bill is logged in"

This is implemented in trunk, see https://github.com/sproctor/php-calendar

Original comment by saba...@gmail.com on 4 Apr 2013 at 7:00

GoogleCodeExporter commented 8 years ago
Thank Sabas for this one. You can check includes/phpcdatabase.class.php if you 
need to do some more custom stuff. Specifically, get_user().

Original comment by sproctor@gmail.com on 4 Apr 2013 at 8:16

GoogleCodeExporter commented 8 years ago
Hey thanks for getting back.  With some dedicated time put in, I have been able 
to show who is logged in, who authored the event and who modified the event and 
email events to those that have chosen to stay in the email list from the 
database.  Very cool stuff.  If others were interested in this type of code, I 
could put in a contribution.

Best Regards
Bill

Original comment by covene...@gmail.com on 5 Apr 2013 at 10:24