3 replies [Last post]
rmcivo1
Offline
Enthusiast
Shropshire | Shrewsbury
Last seen: 9 years 45 weeks ago
Shropshire | Shrewsbury
Joined: 2003-12-05
Posts: 115
Points: 0

Overall Question "How to I insert a <title> as text, not the actually title of the page. Abit Clearer Below

$title = $_POST['title'];
echo "<TITLE> $title </TITLE>"

Sorry for the terrible English
Thanks in advance
Rees

The Cyber World

Tags:
dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 4 years 51 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

PHP title tag

You just want <title> to show up in your HTML?

&lt; title &gt;

although the &lt; / &gt; might be the other way round, I can never remember which is which.

It doesn't matter that you're using PHP, it's the same thing that needs to be 'written' to the HTML.

(I think that's what you want to do... if not can you explain it a bit more clearly?)

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

rmcivo1
Offline
Enthusiast
Shropshire | Shrewsbury
Last seen: 9 years 45 weeks ago
Shropshire | Shrewsbury
Joined: 2003-12-05
Posts: 115
Points: 0

PHP title tag

Yeah thank you, Thats great. In actual fact I am building a meta creator in PHP and it is going great at the moment I put the <title> tag in to a textarea and seemed ok. So I dont know which method to use

If you know What I mean
Thanks Again
Rees
Laughing out loud

The Cyber World

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 2 years 11 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

PHP title tag

Hi

If, say, the text to go into the textarea was $mytext, then do this:

$mytexttoshow=htmlspecialchars($mytext);

which will convert all special chars to their html entities.

Trevor