Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
mysql_connect not working
Old 10-16-2007, 10:40 PM mysql_connect not working
Junior Talker

Posts: 1
Name: Jessica La Porscha
Trades: 0
I can access mysql via the commandline but not through php. I dont' get any error messages, just a blank page. I put in echo lines to check where it breaks and looked at the source being output. It breaks right at the the mysql_connect command.

I am running Vista x64, IIS7, and PHP 5.2.4.

FYI, my php code is as follows:

<?php
echo 'test: Before Database Connection';
@mysql_connect("localhost", "username", "password");
echo 'test: CONNECTED!!!';
?>
jess101 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-17-2007, 12:20 AM Re: mysql_connect not working
Moxxnixx's Avatar
King Spam Talker

Posts: 1,174
Name: Lance
Location: Virginia Beach
Trades: 0
You're not getting an error message because of the "@" symbol in front of mysql_connect.
Delete that symbol to see what the error is. It could be a misspelled username or password.
__________________
Get your facts first, and then you can distort them as much as you please. - Mark Twain

Please login or register to view this content. Registration is FREE
---

Please login or register to view this content. Registration is FREE

All My Sites Are Proudly Hosted @
Please login or register to view this content. Registration is FREE

Moxxnixx is offline
Reply With Quote
View Public Profile Visit Moxxnixx's homepage!
 
Old 10-17-2007, 07:23 AM Re: mysql_connect not working
solomongaby's Avatar
Webmaster Talker

Latest Blog Post:
How Do You Find Music Online ?
Posts: 522
Name: Gabe Solomon
Location: Romania
Trades: 1
mysql_connect("localhost", "username", "password") or die ( 'mysql_not connected : '.mysql_error() );
__________________
If you like my posts ... TK is appreciated:)

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
solomongaby is offline
Reply With Quote
View Public Profile Visit solomongaby's homepage!
 
Reply     « Reply to mysql_connect not working
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.45412 seconds with 12 queries