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 problems. Blank Screen.
Old 04-06-2005, 08:49 AM MySQL problems. Blank Screen.
brokensoul2271's Avatar
- - - - - - - - -

Posts: 750
Location: Lancashire, UK
Trades: 0

I'm haveing some problems installin PHP and MySQL on PWS.
I have instaled PHP and that seems to be working fine (i checkd it with phpinfo() ) but when I run a file to test MySQL I get a blanck screen.

First I tried this:

PHP Code:
<?php
mysql_connect
('localhost','USERNAME','PASSWORD');
mysql_select_db('test');

echo 
'unless you see any error messages, everything should be fine';
?>
I then went to the mysql and php for dummies website and tried this;
PHP Code:
<html>
<head><title>Test MySQL</title></head>
<body>
<!-- mysql_up.php -->
<?php
$host
="localhost";
$user="USERNAME";
$password="PASSWORD";

mysql_connect($host,$user,$password);
$sql="show status";
$result mysql_query($sql);
if (
$result == 0)
   echo 
"<b>Error " mysql_errno() . ": " 
         
mysql_error() . "</b>";
else
{
?>
<!-- Table that displays the results -->
<table border="1">
  <tr><td><b>Variable_name</b></td><td><b>Value</b>
      </td></tr>
  <?php
    
for ($i 0$i mysql_num_rows($result); $i++) {
      echo 
"<TR>";
      
$row_array mysql_fetch_row($result);
      for (
$j 0$j mysql_num_fields($result); $j++) 
      {
        echo 
"<TD>" $row_array[$j] . "</td>";
      }
      echo 
"</tr>";
    }
  
?>
</table>
<?php ?>
</body></html>
I am using MySQL 4, PHP 5 and Personal Web Server on Win98

Any help would be greatly apprieciated, thank you.
__________________
Yes, indeed...

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

Last edited by brokensoul2271; 04-06-2005 at 08:51 AM.. Reason: Title UnDescriptive...
brokensoul2271 is offline
Reply With Quote
View Public Profile Visit brokensoul2271's homepage!
 
 
Register now for full access!
Reply     « Reply to MySQL problems. Blank Screen.
 

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 0.18254 seconds with 12 queries