Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

PHP MYsql

New Here ,
Oct 24, 2007 Oct 24, 2007
I'm trying to connect to My sql via PHP and running a select * from table

I've tried everything and it keeps failing.

and suggestions.

Here is the code:

<?php
/* Program name: buildCheckbox.php
* Description: Program displays a list of
* checkboxes from database info.
*/
echo "<html>
<head><title>Pet Types</title></head>
<body>";
$user="mrappl5";
$host="www.mrapplicant.com";
$password="cool1234";
$database = "mrappl5_test1 ";
$con = mysql_connect("localhost","mrappl5_test","dexter");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);

$result = mysql_query("SELECT * FROM mr_App");
while($row = mysql_fetch_array($result))
{
echo $row['Name'] . " " . $row['Name'];
echo "<br />";
}
mysql_close($con);
?>



Dexter Campbell

TOPICS
Server side applications
277
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2007 Oct 24, 2007
Dexter,

See if this helps:

http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html

--
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com


"Teescott" <webforumsuser@macromedia.com> wrote in message news:ffo46m$8kk$1@forums.macromedia.com...
> I'm trying to connect to My sql via PHP and running a select * from table
>
> I've tried everything and it keeps failing.
>
> and suggestions.
>
> Dexter Campbell
>
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2007 Oct 24, 2007
Teescott wrote:
> I'm trying to connect to My sql via PHP and running a select * from table
>
> I've tried everything and it keeps failing.

If you had really tried everything, you should have succeeded; but since
you don't say what you have tried, it's purely a guessing game as to
what the problem might be.

First of all, have you defined the testing server correctly in your
Dreamweaver site definition?

Are you attempting to work with a local testing server or a remote one?

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 24, 2007 Oct 24, 2007
Under manage sites it was all defined and connects successfully.

I'm working witht the remote server.

Still have my finger crossed.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 24, 2007 Oct 24, 2007
LATEST
Teescott wrote:
> Under manage sites it was all defined and connects successfully.

Be honest with yourself. If everything was defined and connected
successfully, would there still be a problem?

> I'm working witht the remote server.

In the Testing server section of the site definition, Host directory and
URL prefix must point to the same location. The value in Host directory
is the physical path to the site root. The value of URL prefix is the
address you put in a browser address bar to get to the same location.
For example, on a Linux server you are likely to have values similar to
the following:

Host directory: /home/mysite.com/htdocs/
URL prefix: http://www.mysite.com/

Dreamweaver uploads a hidden directory called _mmServerScripts to the
site root. You can't see it in the DW Files panel, but can check whether
it has been created in the right place by using your hosting company's
control panel or another FTP program. Check that it's there, and that it
has the same read/write permissions as other folders in your site.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines