logo-dw

Go Back   Dreamweaver Club Forums > Graphic Design > Web Design
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-06-2009, 03:51 PM   #1
bvanpelt
 
Join Date: May 2009
Posts: 2
Default Basic Help ASAP- Dreamweaver - php ?

Hi everyone, I am a nube to this, so be patient with me.

I am using Dreamweaver, PHP, and MySql
Here is my set up

Domain - remotly hosted
MySql - remotly hosted
Dreamweaver - connects OK to to Domain
MySql - Database set up
Created base HTML website in Dreamweaver, and works OK on Domain
Created php script to access Mysql Table. works ok when executed stand alone. Displays table and data properly

The problem

When I add the php to my html, nothing happens ?????? It does not run at all. no error message, no data displayed. Do I have it backwards ? Is there anyone who can send me the proper example of how to use dreamweaver,php and html ?
This is the code I have in my Dream Weaver Page. I have it as an .html


<?php
$connection = mysql_connect('XXX', 'Orion001', 'password');
mysql_select_db("Orion001", $connection);
$result = mysql_query ("select * FROM ccw_skills", $connection);
While ($row = mysql_fetch_array($result, MYSQL_NUM))
{
foreach ($row as $attribute)
print "{$attribute} ";
print "\n";
}
mysql_close($connection);
?>

Last edited by bvanpelt; 05-06-2009 at 04:03 PM..
bvanpelt is offline   Reply With Quote
Old 05-06-2009, 04:14 PM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

You cannot put PHP in .html pages.
domedia is offline   Reply With Quote
Old 05-06-2009, 04:44 PM   #3
bvanpelt
 
Join Date: May 2009
Posts: 2
Default

ok thanks, I renamed the extension from .html to .php and its working.
bvanpelt is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:19 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com