Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP - mysql - incorrect info showing on browser.

Status
Not open for further replies.

roycrom

Programmer
Aug 2, 2002
184
GB
Hi, hope somebody will be able to help me out on this as Im pretty stumped.

I've got this code
<code>
<? $section = &quot;Console Access&quot;; include ('include/auth.php');
include ('include/config.php');
include (&quot;include/database.php&quot;);
include_once ('include/form.php');
include_once (&quot;include/top_header.php&quot;);

DrawMatrixTableBegin(&quot;97%&quot;);
DrawMatrixRowBegin();
DrawMatrixCustom(&quot;<strong>raXnet cacti (<a href=\&quot;about.php\&quot;>about</a>)</strong>&quot;);
DrawMatrixRowEnd();
DrawMatrixTableEnd();

include_once (&quot;include/bottom_footer.php&quot;); ?>
</code>

in my index.php so that is where the browser points to when I enter my base URL but the page just displays this text all on one line.

raXnet cacti (about)&quot;); DrawMatrixRowEnd(); DrawMatrixTableEnd(); include_once (&quot;include/bottom_footer.php&quot;); ?>

Which is the same as the bottom bit of code.

All the tags look correct and I have been looking at this for ages. I am running redhat linux 7.3 with apache 1.3.23,
php-4.1.2-7.4.6, mysql-3.23.49-3. ------------------------------------------
Thanx | your welcome !!

roycrom :)
 
Change <? to <?php.
By the way, PHP questions generally go in the PHP forum... //Daniel
 
Oops sorry should have gone on php.

Did what you asked and that worked fine but on another machine I had stuff working with just the <? ?> tags and I've got a lot of files that would have needed changing. Forunately there is a line in php.ini that you can turn on and off to allow short tags so I turned that on instead. Thanks for your help tho it set me off on the right tracks :) ------------------------------------------
Thanx | your welcome !!

roycrom :)
 
There is a PHP runtime configuration option &quot;short_open_tag&quot; which controls whether &quot;<?&quot; will work in place of &quot;<?php&quot;.

I've found that you're better off getting in the habit of using &quot;<?php&quot; all the time. It's more portable. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top