Go Back   The macosxhints Forums > OS X Help Requests > Applications

Thread Tools Rate Thread Display Modes
Old 09-20-2011, 04:04 PM   #1
Join Date: Sep 2011
Location: Damascus
Posts: 28
Where is my localhost to connected in php file

Hi all

I am trying to ad a name to Mysql database thru php file with this code

$con=mysql_connect("localhost","root","") or die("problem connecting");

but when I try to open the site from system preferences at web sharing preferences I got the error i created: "problem connected".

so it seems to be that my localhost is somewhere i couldn't located in my php code.

so the line "$con=mysql_connect("localhost","root","") or die("problem connecting");" has somthing wrong

any help please?

Last edited by khsana04; 09-20-2011 at 04:11 PM.
khsana04 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 -5. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.