deemurphy Posted June 27, 2006 Share Posted June 27, 2006 I have developed several web sites using xampp within dreamweaver. One my new web site which hasframes as all of them do, my php scripts are not working properly. I am asked if I want to save oropen 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 goto 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 Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/ Share on other sites More sharing options...
jams Posted June 28, 2006 Share Posted June 28, 2006 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 millionjamsim using dreamweaver mxapache servermysql[!--quoteo(post=388325:date=Jun 26 2006, 09:27 PM:name=deemurphy)--][div class=\'quotetop\']QUOTE(deemurphy @ Jun 26 2006, 09:27 PM) [snapback]388325[/snapback][/div][div class=\'quotemain\'][!--quotec--]I have developed several web sites using xampp within dreamweaver. One my new web site which hasframes as all of them do, my php scripts are not working properly. I am asked if I want to save oropen 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 goto 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] Quote Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/#findComment-50294 Share on other sites More sharing options...
deemurphy Posted June 28, 2006 Author Share Posted June 28, 2006 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.ThanksDee Quote Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/#findComment-50375 Share on other sites More sharing options...
jams Posted June 29, 2006 Share Posted June 29, 2006 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 phpMyAdminjams[!--quoteo(post=388798:date=Jun 28 2006, 07:12 AM:name=deemurphy)--][div class=\'quotetop\']QUOTE(deemurphy @ Jun 28 2006, 07:12 AM) [snapback]388798[/snapback][/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.ThanksDee[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/#findComment-50622 Share on other sites More sharing options...
moberemk Posted June 29, 2006 Share Posted June 29, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/#findComment-50967 Share on other sites More sharing options...
just-j Posted July 10, 2006 Share Posted July 10, 2006 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.. Quote Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/#findComment-55556 Share on other sites More sharing options...
Aftek Posted July 11, 2006 Share Posted July 11, 2006 [quote author=deemurphy link=topic=96917.msg388798#msg388798 date=1151496738]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.ThanksDee[/quote]if you use php5, use mysqli extension... oop available for mysqli connection,easier, and i think safer.[code]<?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)?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/12981-xampp-and-dreamweaver/#findComment-56044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.