What is the best way to display results and data coming from Database in PHP web applications? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this questi开发者_如何学GoonWhat is the best way to display results and data coming from Database in PHP web applications?
Is it Using HTML Tables or HTML Lists or HTML Forms or User-defined Reports? What is the common way that Most PHP Developers and programmers used?
Is there any fast or simple way to do that without the need to customize every output data structure used with every specific web page?
Depends on your needs. You can use the table or Div or JavaScript libraries.
Is it Using HTML Tables or HTML Lists or HTML Forms or User-defined Reports ?
- Use tables if you have tabular data
- Use lists if you have list data
- Never use forms, since forms are for input not output
In short — use the HTML with the semantics that best fit the document (i.e. exactly the same as any other web page).
As for user-defined reports. That's a fairly vague term. If you mean "Allow users to determine which data is displayed", then that has nothing to do with how you express that data. If you mean "Allow users to upload templates", then you'll need to do a fair amount of work to protect yourself (and other users) from malicious templates and to educate users in how to create them.
精彩评论