Title problem in php

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
User avatar
moglimani
Forum Newbie
Posts: 18
Joined: Thu May 28, 2009 5:54 am

Title problem in php

Post by moglimani »

Hi,

I had given the title in the head section but doesnt displayed in the title bar of the browser..i dont know why,
but it is saved as .php only.
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Title problem in php

Post by mikosiko »

what?
User avatar
moglimani
Forum Newbie
Posts: 18
Joined: Thu May 28, 2009 5:54 am

Re: Title problem in php

Post by moglimani »

form.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php require 'dbcon.php';?>
<html>
<head>
<title>FORM</title>


but in the browser title as a untitled
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: Title problem in php

Post by mikosiko »

work for me... maybe something incorrect or not properly closed in your included file
User avatar
moglimani
Forum Newbie
Posts: 18
Joined: Thu May 28, 2009 5:54 am

Re: Title problem in php

Post by moglimani »

mikosiko wrote:work for me... maybe something incorrect or not properly closed in your included file

no,all tags are closed correctly
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Title problem in php

Post by social_experiment »

Try putting the require statement before ANY output (even the html header)

Code: Select all

<?php require 'dbcon.php';?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>FORM</title>
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
moglimani
Forum Newbie
Posts: 18
Joined: Thu May 28, 2009 5:54 am

Re: Title problem in php

Post by moglimani »

wat to do now
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Title problem in php

Post by social_experiment »

Have you tried any of the suggestions you received?, If so, what results did you get?
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
moglimani
Forum Newbie
Posts: 18
Joined: Thu May 28, 2009 5:54 am

Re: Title problem in php

Post by moglimani »

ya i got the result
i am inducing the include function in the first line itself thats the problem..
now i cleared it
Post Reply