[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

User interface written in PHP and HTML for MySQL database application

Posted on 2004-11-21
8
Medium Priority
?
464 Views
Last Modified: 2013-12-12
I am new to programming and web development so please be nice and don’t take anything for granted. I have been studying HTML, XHTML, PHP and MySQL. I have also studied, to some extent, Java and C++, but I am a novice in each area. I have read the books, but I have 0 practical experience.

My goal is this, I want to develop a custom database application that has a web user interface. For this project, I have selected the Apache web server, MySQL and PHP as the technologies to develop my custom application.

I have already created my database and tables within MySQL. I now need to develop a user interface to interact with this database. My vision is to have the main interface window contain (3) framesets. The first frameset would be on the left of the screen. The other two framesets would be divided equally vertically on the right side of the screen as such:
______________
|       |        2    |
|  1   |________|
|       |         3   |
|____|________|

<frameset cols="200,*">
  <frameset rows="100%">
  </frameset>
  <frameset rows="50%,*">
  </frameset>
</frameset>

In frameset 1 I would have options such as New Employee, Products, Customers, Opportunities, etc… Let’s take New Employees for example. When you click New Employees in frameset 1 frameset 2 would displays a tabbed interface where each tab contains related items that you can enter for a specific employee. The tabs would be on top and would be labeled such as General, Detailed, etc… Once you click submit, the new employee is added to the MySQL database and the result is displayed in frameset 3.

I setup the basic window layout using framesets and I know how to display the results in frameset 3 by using “target” in <form> of frameset 2, but I do not know how to do the following:
1. Create the tabbed interface for frameset 2.
2. How to take all the values from the different tabs in frameset 2 to create an INSERT MySQL statement.

I would be greatly indebted to someone if they could provide me either examples or something that I could use to help me pull all this together. Once I understand how to accomplish such tasks, then I feel I could apply the concepts to the rest of the application.

Finally, could you please provide me with what resources you find useful in trying to develop such applications. I have several books, but none of them really cover developing user interfaces in PHP and HTML for database application that utilize MySQL.  
0
Comment
Question by:dignets
  • 4
  • 3
8 Comments
 
LVL 13

Expert Comment

by:bochgoch
ID: 12643582
I'd change one thing -- use CSS for your layout, not Frames.

My favourite CSS reference is the definitive guide from O'Reilly. Also see on the net, where there are many references, perhaps start here:
http://www.meyerweb.com/eric/css/edge/

and follow the links, especially:

http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html
http://www.bluerobot.com/web/layouts/

--which should start your layout off.

In terms of PHP / MySql -- download the manuals from the respective web-sites.

And the code samples here should give you a start:
http://www.weberdev.com/maincat.php3/106/PHP

BG.
0
 
LVL 10

Expert Comment

by:frugle
ID: 12648601
If you DO go down the frames route (please don't) you will need to perform javascript functions on submission to read the values from one frame and write them to hidden form values in the page with the submission.  You're asking for a load of grief though - try to design your UI with all the options on the page that has the submit button. If you NEED to use frames for any reason (and phpMyAdmin does) then do so as accessibly as possible.

references for you:

JavaScript, accessing variables: http://developer.irt.org/script/76.htm

Frames, accessibility: http://www.osec.doc.gov/webresources/Accessibility/DOJappendixBonFrames.html

hope this helps,

Mike
0
 

Author Comment

by:dignets
ID: 12649083
I really appreciate your suggestions on CSS and the links you provided. I have read, to some extent, CSS the past few weeks, but I really don’t see how that gives me the tabbed interface I would like to use and I haven’t found any examples of taking all those fields from a tabbed style interface via PHP to create an insert MySQL statement without a lot of coding just to create a user interface.

I have studied PHP from two different books over the last month or so. I am by no means proficient, but I have studied it. And, I already have the manual, but I have not found much information on creating application style user interfaces, besides the very basic looking ones, with specifics to my above mentioned scenario. Not that mine is advanced or anything, but would be, I feel, a somewhat typical look-and-feel of a user interface. Maybe I am asking for too much with trying to do this with a web interface. It is very possible that I have overlooked something, but PHP and XHTML doesn’t seem to offer an ideal application style user interface that Java offers via it’s JFC and specifically swing.  

I know I could do it with Java and maybe that is what I need to do. But, I was under the impression that PHP was a nice alternative especially with using MySQL. The journals I have read stated that PHP would allow me to develop my application quicker if I didn’t need all the complexities that Java could solve. I didn’t think I really needed all the bells and whistles of Java or J2EE since this application is not an enterprise application. But, as I am beginning to dig into creating a web based user interface for a database application maybe Java would be a better choice, since it already includes the classes I am requesting.

Since PHP is so popular, I though I was definitely missing something since I hear and read that PHP is almost as powerful as java and is a great choice for developing the type of application I want to develop. Thus, the reason for this open question. Which chapter did I obviously overlook? With the amount of talent on this site, I knew someone would be able to help.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Accepted Solution

by:
frugle earned 2000 total points
ID: 12649822
> PHP is almost as powerful as java

Some sports cars are almost as powerful as trucks - they serve completely different purposes though; as do PHP and Java.

If you are looking to make tabbed dialogues and give your whole web console an application feel, look at XUL

Creating Rich Web Applications by Connecting XUL with PHP is a fantastic reference found here: http://www.moztips.com/fortune_cookies_draft1.html

Mike
0
 

Author Comment

by:dignets
ID: 12651316
I believe that is exactly what I was looking for. I was not aware of it. The only application interface I saw was PHP-GTK, but it stated it was not web based.

I will learn XUL, but at first glance, I think it is exactly the answer I was looking for. Thank you!!
0
 

Author Comment

by:dignets
ID: 12651811
After looking more at XUL, it is not supported by Internet Explorer. I know, use FireFox. That is in an ideal world. But, reality is that most users are still using IE. This is not going to work either. It sounds like it is developing user controls via XML or Java. Since I don't want to reinvent widgets, I will just go back and redevelop this in Java.

XUL does seem to be a great fit in my environment, but it will not be for the general public as they are still under Bill Gates control.
0
 

Author Comment

by:dignets
ID: 12657379
One final comment, I gave Mike the accepted answer because he pointed me in the right direction by suggesting that I look at something similar to XUL. That type of functionality is what I was looking for.

I do believe I found my answer though. I am going to attempt to develop the UI in JavaServer Faces (JSF), which should allow me to develop a UI similar to what XUL brings to the table, but also works on multiple platforms including IE.

Thanks for all you help.
0
 
LVL 10

Expert Comment

by:frugle
ID: 12657799
No problem, and thanks for the points.

Fingers crossed that IE7 has some XUL parsing routines, maybe user-definable chrome and a more secure environment to run in - though that would probably make it too similar to mozilla and open up the doors to be sued...

Mike
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month19 days, 6 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question