?> closing tag showing up in HTML

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mayor McCheese
Forum Newbie
Posts: 5
Joined: Tue Apr 23, 2002 12:17 am

?> closing tag showing up in HTML

Post by Mayor McCheese »

WTF... I have a php closing tag ?> that keeps appearing in the HTML source. I can't figure out what's going on. Here's the code:

<?php

//include form class
include('includes/dbconn.php');

$allUsersResult = $db->query(' SELECT pkId, lname, fname FROM xxx_users' );

include ('includes/classes/Form.class.php');




?>

Thanks in advance...
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

check

Post by itsmani1 »

try this one instead of ur own. i am not 100%sure for this but i think it will work.,.......

Code: Select all

<?php
//include form class 
include('includes/dbconn.php'); 

$allUsersResult = $db->query("SELECT 'pkId', 'lname', 'fname' FROM xxx_users" ); 

include ('includes/classes/Form.class.php'); 


?>

Regards......
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Do a search in the page generating the HTML for any extra ?> because these things can creap in and insist on making your life difficult.

Mac
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

It's most likely in one of your includes, since the code you gave us looks good to me..
Mayor McCheese
Forum Newbie
Posts: 5
Joined: Tue Apr 23, 2002 12:17 am

There we go...

Post by Mayor McCheese »

Hey all,

Thanks for the suggestions; a search of the main file did not turn up an extraneous end tags; but a search of one of the includes did. Thanks for saving me time + frustration.

Cheers!
Post Reply