MySQL / PHP
Moderator: General Moderators
MySQL / PHP
I am running php and MySQL. If I run MySQL at cmd command prompt or through windows explorer, it works, I can create database, tables, insert data, etc. Here no problem, it works.
But when I am running the following code, just to make sure I am connected to the database, it does not work. When I run the following code, no error messages or not even 'success' message. Blank white
screen pops up. Even I refreshed id. Same.
Also, when I run phpInfo(), it works fine. Shows all the info.
Can anybody help me to fix this please.
I am running Windows 2000, IIS.
<?
$connection = @mysql_connect("d2rsyc11","myUN","myPW") or die(mysql_error());
if ($connection) {
$msg = "success!";
}
?>
<? echo "$msg"; ?>
But when I am running the following code, just to make sure I am connected to the database, it does not work. When I run the following code, no error messages or not even 'success' message. Blank white
screen pops up. Even I refreshed id. Same.
Also, when I run phpInfo(), it works fine. Shows all the info.
Can anybody help me to fix this please.
I am running Windows 2000, IIS.
<?
$connection = @mysql_connect("d2rsyc11","myUN","myPW") or die(mysql_error());
if ($connection) {
$msg = "success!";
}
?>
<? echo "$msg"; ?>
Run this:
What does it say about MySQL?
Code: Select all
<?php
phpinfo();
?>Thank you for your time, the following is the result of
your latest code. Please help. Thank you again.
Array
(
[0] => bcmath
[1] => calendar
[2] => com_dotnet
[3] => ctype
[4] => ftp
[5] => iconv
[6] => libxml
[7] => odbc
[8] => pcre
[9] => session
[10] => SPL
[11] => SQLite
[12] => standard
[13] => tokenizer
[14] => zlib
[15] => dom
[16] => SimpleXML
[17] => wddx
[18] => xml
)
your latest code. Please help. Thank you again.
Array
(
[0] => bcmath
[1] => calendar
[2] => com_dotnet
[3] => ctype
[4] => ftp
[5] => iconv
[6] => libxml
[7] => odbc
[8] => pcre
[9] => session
[10] => SPL
[11] => SQLite
[12] => standard
[13] => tokenizer
[14] => zlib
[15] => dom
[16] => SimpleXML
[17] => wddx
[18] => xml
)
Have a read of this article: http://www.raditha.com/mysql/mysqli.php
If you use Windows, check out: http://forums.devshed.com/archive/t-160413
If you use Windows, check out: http://forums.devshed.com/archive/t-160413