PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am trying to display information from an SQL database onto an HTML page. The goal is to display the Title and Article inside of a white space on an HTML page.
I copy/paste the code into an HTML document and it doesn't seem to work. How do I get the Title and Article from the following code to display properly?
Well nothing is happening when I paste that exact code into HTML. It should be taking two data points, title and thearticle, and displaying them. But all I get is the a part of the code displayed on the HTML - as if its not reading the <?php ?>. Here is the result when its pasted verbatum on a website:
query('SELECT title,thearticle FROM cmsarticles WHERE ID = 1'); ?>
Is there a solution? My goal is to embed updates into HTML so that clients can make changes to only single areas of the site through PHP - then the HTML is updated.
zip your files and send to my email (manoloDOTwebmaster@gmailDOTcom), I'll take a closer look. And please try to explain as well as you can what you are trying to accomplish.
Manohoo - thanks for all your feedback. It got me thinking - im just gonna develop this whole site using PHP and build it right rather than jury rigging existing code. Good challenge anyway. But you have been a big help - thanks!