Skip to main content
Known Participant
June 4, 2009
Question

PHP MySQL data display problem

  • June 4, 2009
  • 4 replies
  • 2445 views

I am having trouble getting data to display on my web page.

In Dreamweaver CS3, I created a new page.

Selected PHP as the type.

Saved it.

Connected a database and created a recordset (all using Dreamweavers menus. I did not write any code).

NOTE: The database is on a remote server.

The TEST button displayed the records from the recordset with no problem.

On the new page, I then typed some text.

Then dragged some fields from the Bindings tab to the page.

I saved it and then went to preview it in my browser.

The page comes up completely blank. Not even the text shows.

I then saved the page as an HTML page.

When I preview this in my browser, the text shows, but the fields and data do not.

I then tried creating a dynamic table (again, using the Dreamweaver menus.).

A similar thing happens, ie. If I save it as an HTML, the text shows and the column labels and border shows, but no data.

Nothing shows if I save it as a PHP file.

I can view the data online using files created by PHPMagic, so I know the data is there and retrievable.

It is just in pages created in Dreamweaver that don’t work.

What am I doing wrong?

This topic has been closed for replies.

4 replies

David_Powers
Inspiring
June 6, 2009

Question assumed answered. Locking thread because of bouncing email.

David_Powers
Inspiring
June 5, 2009

pabirds wrote:

The page comes up completely blank. Not even the text shows.

That means there's an error in your PHP code, and display_errors is turned off. Edit php.ini to change display_errors. It should be this:

display_errors = On

Save php.ini, and restart Apache.

As a temporary measure, you can add this to the very beginning of your PHP page:

<?php ini_set('display_errors', '1'); ?>

As long as it's not a syntax error, such as a missing semicolon or quote, the error message should appear onscreen.

pabirdsAuthor
Known Participant
June 5, 2009

If there is an error in the code it was done by Dreamweaver, as I did not write any code myself. I relied totally on the Dreamweaver menus.

I assumed Dreamweaver would put in all of the appropriate code for this simple page.

Therefore I also assumed someone else would have done a similar series of steps and encountered this same problem and would be able to help me.

The last thing I want to do is learn another programming language. That is one reason I selected Dreamweaver in the first place.

In my original post, I outlined the steps I took to create these pages that don't work. Did I miss some step along the way?

David_Powers
Inspiring
June 5, 2009

pabirds wrote:

If there is an error in the code it was done by Dreamweaver, as I did not write any code myself. I relied totally on the Dreamweaver menus.

I assumed Dreamweaver would put in all of the appropriate code for this simple page.

Dreamweaver didn't make an error. It used the information you gave it. Unfortunately, relying totally on Dreamweaver to do things for you is a dangerous strategy. As Mark has pointed out, the problem lies with the use of virtual(). This is supported only by the Apache web server when PHP is loaded as a module.

Change your site definition to use links relative to the document, rather than the site root, and re-create the MySQL connection. Then the problem will go away.

Dreamweaver speeds up the generation of PHP code, but you still need to understand what it does, and whether it's suitable for the job you want it to do.

Mark_A__Boyd
Inspiring
June 5, 2009

To view php pages - or pages with PHP code in them - in a browser, the page must be served up by a Web server that supports PHP. You can set up a testing server on your local machine for this purpose. Look for WAMP (Windows), MAMP (Mac), or XXAMP for some easily installed packages.


--
Mark A. Boyd
Keep-On-Learnin' :-)
This message was processed and edited by Jive.
It shall not be considered an accurate representation of my words.
It might not even have been intended as a reply to your message.

pabirdsAuthor
Known Participant
June 5, 2009

My web server supports PHP. I can disply PHP pages created by other software packages, just not the Dreamweaver ones.

Frank

Date: Thu, 4 Jun 2009 19:04:03 -0600

From: forums@adobe.com

To: fchbmh@hotmail.com

Subject: PHP MySQL data display problem

To view php pages - or pages with PHP code in them - in a browser, the page must be served up by a Web server that supports PHP. You can set up a testing server on your local machine for this purpose. Look for WAMP (Windows), MAMP (Mac), or XXAMP for some easily installed packages.

--

Mark A. Boyd

Keep-On-Learnin'

This message was processed and edited by Jive.

It shall not be considered an accurate representation of my words.

It might not even have been intended as a reply to your message.

>

Participant
June 4, 2009

thats almost similar to mine.... my template for HTML  is giving me problems also ...

I build it then it works fine ... then weeks later the darn thing wont allow me to build a single page fron that template???