Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP Editor like this needed:

PHP Editor like this needed:
Thread Tools
greenG4
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Jun 21, 2007, 10:33 PM
 
I need a program that can generate php forms based off a MySQL database.
This is the only one I've seen that comes close, but I can't find it anywhere:
JaneBuilder 2.0pr2 - MacUpdate

I am open to any suggestions. At least ones that do not require me to learn everything about PHP in the next week.
<Witty comment here>
www.healthwebit.com
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 21, 2007, 10:52 PM
 
There are lots of little things that need to be done to make forms really work - converting non-DB safe characters to their ASCII equivalents, formatting input to be compatible with the table's field type, providing feedback to the user, error checking, handling required fields, etc.

I really doubt that you could find a way to automate such a process. I would suggest having a PHP programmer do this. If you want to send me the details, I might be interested in such a job providing we can work out the details. I've done a gazillion PHP forms...
     
greenG4  (op)
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Jun 22, 2007, 12:03 AM
 
Thanks for the offer besson3c, I'll keep that in mind as a possibility--it's for a school project though, so here would not be a possibility for any compensation. I was looking at this:
Web Form Generator - Create web forms easy and fast
and was hoping there was something similar for Mac. If not, that's why they invented bootcamp.

Edit: here is what is says it can do (and does, I tried it)
Web Form Generator Features:

Easy to use graphical interface
Connect to your remote or local server
Integrated Javascript HTML WYSIWYG editor
Various input fields: text, textarea, listbox, checkbox, combobox, listbox
Generate insert page
Generate update page
Generate delete page
Generate list page
Generate detail page
Form validation
Filter area for list pages
Easy editable look and feel


Or is this too good to be true? I guessing it wouldn't be the most secure DB Web App...
<Witty comment here>
www.healthwebit.com
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 22, 2007, 12:26 AM
 
My instincts tell me that it will probably be problematic given teh complexity of what it is trying to automate, but if it works it works.

Personally, I just don't like spending time on something that might be a dead end.

Let me/us know if you decide to do this by hand and would like our help!
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Jun 22, 2007, 01:08 AM
 
Looks nice. I got most of the way through creating a similar thing for Cocoa/SQLite (as a Cocoa framework), then went to WWDC2004 and heard about CoreData, and stopped developing it right there and then.

What you're after is certainly possible, but as besson3c says, it's a very complex thing to do it right. It looks like those guys have done a good job, and it must be a very useful tool. Something similar for Mac OS X would be fanstastic.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 22, 2007, 01:15 AM
 
The other option is to install phpMyAdmin. It is a web GUI for adding/editing/deleting data from MySQL tables, possibly useful if you would trust providing this level of access to whomever will be doing the data entry.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 22, 2007, 01:33 AM
 
It's certainly possible. This is one of the basic features of Rails.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
tintub
Mac Elite
Join Date: Jan 2003
Location: Melbourne, AU (from Bristol UK)
Status: Offline
Reply With Quote
Jun 22, 2007, 01:53 AM
 
does it have to be PHP? Rails is made for this, you could do it in 10 mins. If you end up coding it yourself in PHP look at PEAR's DB_DataObject and HTML_QuickForm packages.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 22, 2007, 02:06 AM
 
Someday I need to learn about Rails and perhaps even PEAR.
     
greenG4  (op)
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Jun 22, 2007, 08:45 AM
 
Originally Posted by Chuckit View Post
It's certainly possible. This is one of the basic features of Rails.
What I really like about that Windows app is that it will generate insert, update, etc forms directly off the the MySQL db structure. I am looking at Rails now, but I'm unsure of exactly how it works.
<Witty comment here>
www.healthwebit.com
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 22, 2007, 10:21 AM
 
Originally Posted by greenG4 View Post
What I really like about that Windows app is that it will generate insert, update, etc forms directly off the the MySQL db structure. I am looking at Rails now, but I'm unsure of exactly how it works.
You type, for example, scaffold :users in an ActionController's body and it will dynamically generate a simple CRUD interface to the users table. Or you type script/generate scaffold users on the command line and it'll actually create a model, controller and view files with the equivalent code. It's a Web development framework, though, not an application, per se.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
greenG4  (op)
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Jun 22, 2007, 11:23 AM
 
Originally Posted by Chuckit View Post
You type, for example, scaffold :users in an ActionController's body and it will dynamically generate a simple CRUD interface to the users table. Or you type script/generate scaffold users on the command line and it'll actually create a model, controller and view files with the equivalent code. It's a Web development framework, though, not an application, per se.
Yeah. See, I'm not a Unix guy. The terminal scares me.
<Witty comment here>
www.healthwebit.com
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jun 22, 2007, 10:20 PM
 
Rails is a framework. Similar php frameworks are codeigniter and cakephp.

While I haven't really looked into them, I presume they both have scaffolding features.

Be advised though. No matter what package you use, be sure that there is a means to validate data. Otherwise, you really compromise the security of your machine.

Also be advised that there is no magical 1 to 1 translation for MySQL databases and HTML forms. While strict naming conventions help to tie in foreign keys, join tables are trickier. Likewise MySQL has no way of knowing that a field that accepts a single digit integer should be a 0 or 1 value or 0 - 9 value.
     
greenG4  (op)
Grizzled Veteran
Join Date: Aug 2002
Location: Cardboard Box
Status: Offline
Reply With Quote
Jun 23, 2007, 03:00 PM
 
I appreciate your points, registered_user. I am trying out this app: Web Form Generator - Create web forms easy and fast as noted above, and I gotta say, I'm pretty impressed. I generated this in about 0.68 seconds:

http://www.healthwebit.com/patients/
http://www.healthwebit.com/inventory

I'm doing this as a project for my Management of Health Informatics degree. I want to give a demonstration of FOSS and it's potential use in the medical field as a way to decrease costs. The problem is that I am only a "wanna be" developer who has enough knowledge to maybe make something work, but not really know if it's done correctly. So if anyone wants to take a look at the windows app and/or my page... :-)
( Last edited by greenG4; Jun 23, 2007 at 04:48 PM. )
<Witty comment here>
www.healthwebit.com
     
registered_user
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Jun 23, 2007, 08:55 PM
 
well, it seems to reject at least some bad input, so you're not super vulnerable from a security stand point. I don't know how vulnerable it truly is, but it seems ok at first glance.

If you're not a developer, and it works, then go for it.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:58 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,