Discussion Forums  >  Uncategorized

Replies: 8    Views: 208

rarrrr123
I hate code!
Profile
Posts: 78
Reg: May 22, 2011
location unknow...
780
11/23/11 04:22 PM (14 years ago)

PHP Help

Hi, I wondered if anyone would be able to help with a project for the school I work in. I am looking to add a function to a school app, to try and encourage some of our students who do not normally like learning to use their mobile phones to work and learn. I would like to have a 'timetable' feature where students can enter their username and it shows their timetable on screen (the app would remember the user id). I am OK with getting the mysql data with all their timetables, but I would not know where to begin in PHP app side. Would anyone be willing to help?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/23/11 09:31 PM (14 years ago)
Hi @rarrrr123, This is actually relatively easy to do. I could envision a list screen where each item is a person's name, and tapping that name connects to a Custom URL. That URL is a php call to a database that has the users' timetable information in it. The script runs, retrieves the info, and prints it back out as an HTML screen. Is that pretty much what you're thinking? The php for that would be very simple. Mark
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/23/11 09:50 PM (14 years ago)
a) Make the webpage that will pull the data from mySQL and output it. Like @GoNorthwest says...not a biggie. You're URL to this page would like: http://www.mysite.com/timetable.php?studentId=34 PHP would grab the 34 from the URL and output the mySQL data for the student with that id. Ok, get this page done, load it in a browser to make sure you have it looking the way you want. Change the id in the address bar, refresh, does it pull the proper students data? Test the heck out of this page. Make it look nice for mobile. b) Don't worry about creating a magic PHP screen to list students. If you only have a few dozen, just create a students.txt file and plop in on your webiste. This file will have JSON data formatted with childItems (see the docs) one for each student. This text file will be used to power the Simple Menu list items. In other words, your Simple Menu's Data URL (advanced settings) will point to this text file on your website. Because it's formatted like the docs show, it will power the list. c) Connecting the menu tap to the webpage could get tricky, depends on your skill. There are a few ways to do this. The first way is to create a BT_screen_customURL screen object in Objective C code when the item is tapped. The row-tap would load this screen passing the id of the student to your URL. Another way would be to just create a few dozens (how ever many there are) Custom URL screens in your control panel, one for each student. Give them nicknames with the student names so you can keep track. Connect your menu items to these. Lame for lots of students but maybe easier to understand. Another way, create a JSON load screen object in the students.txt file for each item to load the students URL. The last way, concede to the idea that this is just too darned complicated and you're not quite ready for these advanced concepts, post the URL to the timetable webpage you made so the forum can see it and see if somebody will create the students data file (to drive the list) for you. It's a holiday weekend, somebody will be bored ;-)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/23/11 09:54 PM (14 years ago)
I'm totally willing to help!
 
rarrrr123
I hate code!
Profile
Posts: 78
Reg: May 22, 2011
location unknow...
780
like
11/24/11 02:58 PM (14 years ago)
All sounds very interesting. We have 1400 students, so a list may not be feasible :S, especially as it is constantly changing. I think I will go and get the data together in the SQL db and then scratch my head. Will grab you then if thats ok GoNorthWest?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/24/11 03:35 PM (14 years ago)
You can alphabetize the list, and there is also the ability to search, all in buzztouch. You can generate the list using a SQL query and creating a JSON file...all easy stuff! Ping me at mrkfleming at gmail dot com when you need some help!
 
rarrrr123
I hate code!
Profile
Posts: 78
Reg: May 22, 2011
location unknow...
780
like
11/24/11 04:03 PM (14 years ago)
I've had another thought. Doing it this way with SQL etc will rely on my to be updating the database with new timetables etc all the time. Maybe it would be better if I turned it around and put the focus on the user. Would it be possible in a BT app, to create a grid where students can enter their timetable (5 lessons per day on a two-weekly timetable) which is then stored on their actual handset instead?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/24/11 04:19 PM (14 years ago)
It can probably be done, but not easily in BT. Not sure if anybody has figured it out in BT. You could have the person log into the app when it launches, and present just info for them? Then you don't have to maintain a list of students.
 
rarrrr123
I hate code!
Profile
Posts: 78
Reg: May 22, 2011
location unknow...
780
like
11/25/11 02:17 AM (14 years ago)
I think I am going to have to think about this properly in terms of how it would be managed. Every student (1400 of them) could all potentially have a different timetable. I think I will just get it all in the sql db and go from there will ping you soon. Thanks for the advice to far. MUCH appreciated :)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.