Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 259

AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
10/29/12 08:19 AM (13 years ago)

PHP/Database driven pages in buzztouch?

Hey, I'm just starting out on my 'buzztouch journey', I'm hoping someone can point me in the right direction? I'm trying to make an app that is basically a list of locations on a map and when you click on the location you get a page with information on the location you just clicked (seems simple enough). For the 'info' pages, I thought the best approach would be to have a standard page layout (i.e. name, description, etc) and then use php to populate these from a database. Firstly, can I use php on the HTML/HTML5 page plug-ins? Secondly, having done some research on adding a database to an android app it seems to be fairly advanced, would this be an accurate assessment? If not, does anyone have any "idiot's guides to..." that they can recommend? Any advice on these would be appreciated! Thanks, Adam
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
10/29/12 09:11 AM (13 years ago)
Hi @AdamDynamic, Buzztouch cannot handle php files so I use a custom link. Adding a database is not difficult, but it takes time. If you have the time to learn then anything can happen. I am thinking of doing a guide on php/databases, but still looking if it's a need with buzztouch. LA
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/29/12 09:35 AM (13 years ago)
Hi @AdamDynamic, Welcome to buzztouch! HTML/HTML5, plus CSS/JavaScript/jQuery/AJAX are all perfectly acceptable in the HTML Doc page. No problems there. You cannot run a php script directly in an app because php requires an interpreter to be installed (installing PHP on your web server, for example), which cannot be done on your device. You can, as @LA suggests, put your PHP scripts on a web server, and call them from a URL in your app. No problems there! Keep posting with your questions! Mark
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
10/29/12 10:23 AM (13 years ago)
This link might help you connect Android and PHP with SQL on the server side. http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/
 
AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
like
10/31/12 05:23 AM (13 years ago)
Ah, I should have realised that php wouldn't work. Thanks for the help! If running jquery is possible on the HMTL pages then there might be some cool things I could do with the JQuery Mobile library that should solve my problems. With regards to the CSS, I'm assuming that you would have to include the necessary code at the top of the HTML page? Thanks again! Adam
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
10/31/12 08:30 AM (13 years ago)
Hi AdamDynamic, When you click on Custom Html Plug in the adding new screen, click on the source at top of the Html and put your coding in there. Be careful of different processors of copy/paste of your coding, as it may not come out the way you want. Hope this helps. LA
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/31/12 09:26 AM (13 years ago)
Hi Adam, You can also reference CSS via a file if you don't want to put it directly in the HTML document. The file can be on the app (in the same folder as the HTML doc), or at a URL...your choice! Mark
 

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.