I am running Apache 1.3.2 and PHP 4.3.2 . and MySQL and everything seems to work, I can even connect to the database but when I try to pass a simple variable through the browser a parsing error on line 9 or I get a blank page?
for example:
8 <body>
9 <?php echo*“Hello, $username”; ?>
10 </body>
There we go!!! Thanx njs12345. That thing was driving me nuts. At least now I know it was syntax that was wrong instead of trying to figure out if my php pages were bring processed. Thanks for the help, simple but very useful info.
One more thing, instead of posting a new thread. This code is from one of the tutorials in conneting to a database through flash. But, when I try it (with my database info of course). I get parsing errors. Could it be the same reason discussed above? Better not to put variables inside a string.
<?php //read.php
//prints contents of content column where filename = $file
if($file) {
$link = mysql_connect(dbhost, dbuser, dbpassword)
or die("<b>error</b>: failed to connect to database");
$query = “SELECT content FROM files WHERE filename=’$file’”;
$result = mysql_query($query)
or die("<b>error</b>: failed to execute query <i>$query</i>");