Jump to content


Photo

xampp and dreamweaver


  • Please log in to reply
6 replies to this topic

#1 deemurphy

deemurphy
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 27 June 2006 - 02:27 AM

I have developed several web sites using xampp within dreamweaver. One my new web site which has
frames as all of them do, my php scripts are not working properly. I am asked if I want to save or
open the php script, to open it will put me in dreamweaver. I am using dreamweaver 8.

On the ones I have previously created they also have frames and are working correctly. What could I
doing wrong. I get the same results on Netscape and IT. Apache, MYSQL, etc. is working. If I just go
to the page that call the php script from either of these the PHP script brings up the correct page.

Thanks for any help.
Dee [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]

#2 jams

jams
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 June 2006 - 03:42 AM


hi Dee,
first of all im very sorry..im not here to help on your topic posted..im a new member in tis forum n im not sure where to post my question..im a practical student currently doing a project under one company..i was asked to develop an intranet system..im using xampp sotfware..i have already developed a database in myphpadmin. im not sure on how to connect it to the dreamweaver...is there any coding needed??hope u can help me on it..tnx a million

jams

im using dreamweaver mx
apache server
mysql



[!--quoteo(post=388325:date=Jun 26 2006, 09:27 PM:name=deemurphy)--][div class=\'quotetop\']QUOTE(deemurphy @ Jun 26 2006, 09:27 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I have developed several web sites using xampp within dreamweaver. One my new web site which has
frames as all of them do, my php scripts are not working properly. I am asked if I want to save or
open the php script, to open it will put me in dreamweaver. I am using dreamweaver 8.

On the ones I have previously created they also have frames and are working correctly. What could I
doing wrong. I get the same results on Netscape and IT. Apache, MYSQL, etc. is working. If I just go
to the page that call the php script from either of these the PHP script brings up the correct page.

Thanks for any help.
Dee [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]
[/quote]


#3 deemurphy

deemurphy
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 28 June 2006 - 12:12 PM

To asnwer your question this is what I use:

$conn = mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("database",$conn) or die(mysql_error());

This worked for me with dreamweaver MX and dreamweaver 8.

I just hope someone can help me soon.

Thanks
Dee

#4 jams

jams
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 29 June 2006 - 12:19 AM

hi dee,
tnx for quick reply..i have a another doubt..where am i suppose to insert that function? and do i need to do any modification in the config.inc?tis file can be found in phpMyAdmin


jams




[!--quoteo(post=388798:date=Jun 28 2006, 07:12 AM:name=deemurphy)--][div class=\'quotetop\']QUOTE(deemurphy @ Jun 28 2006, 07:12 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
To asnwer your question this is what I use:

$conn = mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("database",$conn) or die(mysql_error());

This worked for me with dreamweaver MX and dreamweaver 8.

I just hope someone can help me soon.

Thanks
Dee
[/quote]

#5 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 29 June 2006 - 07:28 PM

To actually answer the topic question...
That means that your PHP script isn't running as a PHP script, it's running as a file. I'd make sure that your PHP is still running.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#6 just-j

just-j
  • Members
  • PipPipPip
  • Advanced Member
  • 52 posts

Posted 10 July 2006 - 02:24 PM

im having the same problem with browser wanting to save the .php file..  i use wamp 5 as my local server to script .php files.  it has been working but just recently starting this and i didnt change any settings..

#7 Aftek

Aftek
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 11 July 2006 - 07:06 AM

To asnwer your question  this is what I use:

$conn = mysql_connect("localhost", "username", "password") or die(mysql_error());
mysql_select_db("database",$conn)  or die(mysql_error());

This worked for me with dreamweaver MX and dreamweaver 8.

I just hope someone can help me soon.

Thanks
Dee


if you use php5, use mysqli extension... oop available for mysqli connection,
easier, and i think safer.
<?php
$mysqli = new mysqli ($host, $username, $password, $schema);
if (mysqli_connect_errno()) echo "error connection to database";
else
{

    //inset, update, alter, etc... which returns nothing. 
    $mysqli->query ($query);
    if (mysqli_error ($mysqli)) echo "error updating database";


    //select
    $result = $mysqli->query ($query);
    if (!$result) echo "error getting information from database";
    elseif ($result->num_rows == 0) echo "no result";
    else
    {
        while ($row = $result->fetch_assoc())
        {
             //example:
             $something_id = $row['row_id'];
             $something_name = $row['row_name'];
        }
    }

    //if the result was successful ( even 0 row ) be sure to close result before user further $mysqli->query
    if ($result) $result->close();

    //and close the connection once your done.
    $mysqli->close(); //or unset ($mysqli)
?>





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users