----- Original Message ----- 
From: "Arne Stone"

Hallo all,



Sorry for the n00b question!

I am busy learning PHP and from the eBook I copied this code:

<?php
// open connection to MySQL server
$connection = mysql_connect('localhost', 'MyUsername', 'MyPassword');
// print status message
if ($connection)
{
echo 'Connected!';
}
else
{
echo 'Could not connect!';
}
?>



When I open this in my browser I just see a blank screen not one of the
echo's shows....What could be the problem?



Thanks in advance.

---------------------------------

Hello Arne Stone,
                           Have a look at the source of the page in your 
browser - View Source

If you see the raw coding then your server is not parsing the file as php. 
Is the server file extension php? and is the server set up to parse .php 
files as php?

Also, this syntax is unusual, it is the same as I use ie -

normal syntax format -

if(condition){
//code ;
}

this syntax format -
if(condition)
  {
  // code ;
  }

I thought I was one a very few that do this as it comes from PASCAL which 
was a very long time ago.

Where did you get this coding syntax from??

Thanks. 

Reply via email to