Politicians and diapers have one thing in common. They both should be changed regularly and for the same reason.
-
Frontpage site with fp server extensions. I would like to get some data from a mysql db to display in the html pages. I've seen some js that is supposed to call a php page. So far, no luck. Any ideas or code snippets that you know works.Posted 2 years ago #
-
dontor wrote:Frontpage site with fp server extensions. I would like to get some data from a mysql db to display in the html pages. I've seen some js that is supposed to call a php page. So far, no luck. Any ideas or code snippets that you know works.
What dynamic language? Is this on your box or online? If online what does the host offer in the way of languages? If yours you can download and run CF developer if you do not need more than 3 concurrent connections.Messes made. Jobs left undone. FREE estimates.Posted 2 years ago # -
dontor wrote:Frontpage site with fp server extensions. I would like to get some data from a mysql db to display in the html pages. I've seen some js that is supposed to call a php page. So far, no luck. Any ideas or code snippets that you know works.
You can use PHP only if that's available on your server, and you don't need js to call it, you can do so directly from a PHP script.
FWIW, here's the source to one of my pages (http://pierre.szwarc.free.fr/Files/index.php?lang=EN). Names have been changed to protect the innocent. It's not very good code, but it works – it was my very first PHP code. I wrote it 5 years using a plain text editor, and I haven't been very active in maintaining the site since. Rename the .TXT files to .PHP."If those who say bad things about me knew what I think of them, they'd say even worse." (Sacha Guitry)
------------------------------------------------
"Earth is the cradle of mankind. Nobody can live in the cradle forever" (Constantin Tsiolkovski)Posted 2 years ago # -
Released by Quiet Technology® now there's a blast from the past!
Nightowl
Just another speck of paint on the pillar of society.Posted 2 years ago # -
I guess I wasn't very clear. Sorry. On my site, I have an include which by FP in an html page. I have some data (lake level, rainfall, etc) that is in a mysql db that changes daily and wanted to automate it's updating with code vs having to enter it in the include each day. Yes the host does have php installed.iow, I am trying to get a html page to execute a php page so I pass the mysql data into the html page.Posted 2 years ago #
-
dontor wrote:I guess I wasn't very clear. Sorry. On my site, I have an include which by FP in an html page. I have some data (lake level, rainfall, etc) that is in a mysql db that changes daily and wanted to automate it's updating with code vs having to enter it in the include each day. Yes the host does have php installed.iow, I am trying to get a html page to execute a php page so I pass the mysql data into the html page.
Working in any dynamic language and database is very simple and follows the same procedures.
1) query the database
2) display the contents of what is found.
This is a basic statement you should run to find out what version is installed
open notepad and copy that. Save the file as something like phpinfo.php, upload it, and run it. This will show you everything you need to know about the installed version of php.
Here is a basic database query and display tutorial that you will find useful. If you get stuck anywhere just ask
http://devzone.zend.com/node/view/id/641
I would suggest that you make this a php include file called lakeInfo.php and call it into your html page where you want your data displayed using
By creating a separate include fine you compartmentalize all of your code in one easy to find and edit location.
You are going to need to know the name of the mySQL database holding the info you want to retrieve along with the DB username/password and the names of the tables and rows holding the data.
PHP is NOT my first choice for a dynamic language but I can help you through something this simple.Posted 2 years ago #

