NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Why wont this work??

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
2 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 09-24-2005, 08:10 AM THREAD STARTER               #1 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Why wont this work??


myfileminder.com/articles/dbconnect.php
PHP Code:
$server="---server---";
????: NamePros.com http://www.namepros.com/programming/126236-why-wont-this-work.html
$user="---username---";
$pass="---password---";
$database="---database---";
$sql="---query---"
webmaster.php
PHP Code:
include 'http://www.myfileminder.com/articles/dbconnect.php';     
mysql_connect($server,$user,$pass) or die("Could not connect to database: " mysql_error());
mysql_select_db($database) or die("Could not select the database: " mysql_error());
$result=mysql_query($sql) or die("Could not query the database: " mysql_error());
mysql_close(); 
When I run it I get the error
Code:
Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in e:\domains\m\myfileminder.com\user\htdocs\articles\webmaster.php on line 16
line 16 is this:
????: NamePros.com http://www.namepros.com/showthread.php?t=126236
PHP Code:
mysql_connect($server,$user,$pass) or die("Could not connect to database: " mysql_error()); 
but I cant find the problem.
Last edited by Mikor; 09-24-2005 at 08:23 AM.
Barrucadu is offline  
Old 09-24-2005, 09:23 AM   #2 (permalink)
Pro Coder & Designer
 
aween's Avatar
Join Date: Apr 2005
Location: Netherlands
Posts: 967
aween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really nice
 



Code:
include 'http://www.myfileminder.com/articles/dbconnect.php';
you cant do that if you are on a different server/ip
????: NamePros.com http://www.namepros.com/showthread.php?t=126236

do this:
Code:
include 'dbconnect.php';
__________________
aween web development
aween is offline  
Old 09-24-2005, 09:53 AM THREAD STARTER               #3 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




hmm... thing is I want that script to work on other peoples sites, its an article script I'm working on, thats the script webmasters use to display the articles...
Barrucadu is offline  
Old 09-24-2005, 10:57 AM   #4 (permalink)
Senior Member
 
csmaster2005's Avatar
Join Date: Mar 2004
Location: U.S.A.
Posts: 1,985
csmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nice
 



you're going to have to provide the username/pass/ip as a feed then parse it out since you're doing it remotely. Or you could also just provide the info that they're going to put on their site as a feed then you wouldnt need the whole connection issue.
csmaster2005 is offline  
Old 09-24-2005, 11:17 AM THREAD STARTER               #5 (permalink)
Senior Member
 
Barrucadu's Avatar
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,689
Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold
 




Quote:
provide the info that they're going to put on their site as a feed
how the hell would I do that?
Barrucadu is offline  
Old 09-24-2005, 10:06 PM   #6 (permalink)
Senior Member
 
csmaster2005's Avatar
Join Date: Mar 2004
Location: U.S.A.
Posts: 1,985
csmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nicecsmaster2005 is just really nice
 



You may want to research what a feed does..
basically you print all the info on a page, and then you write your script to goto your site and parse the info from that page.
csmaster2005 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for Support / Design Work webdirect For Sale / Advertising Board 0 05-29-2005 03:01 AM
CAUTION: Don't work with Metalicdesigns/ Serverplace NET Deathdart Web Development Wanted 30 03-28-2004 06:56 AM

 
All times are GMT -7. The time now is 12:13 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger