Web Hosting Talk







View Full Version : Can you set page title with CGI?


dynawebd
05-10-2006, 03:56 PM
You know how you can use javascript to set a page title...
document.title=($title)

Is there any way to do this in CGI?

ThatScriptGuy
05-10-2006, 04:26 PM
In PHP it'd be a simple

<? echo '<title>Hello</title>'; ?>

I don't do CGI but I imagine it'd be something like print "<title>Hello</title>";
or something similar.

GnomeyNewt
05-10-2006, 05:31 PM
If you are putting the header in prints, than yes it would work:

print "<title>Title here</title>";

But don't forget you need <html><head> tags too!