fileserverdirect
05-29-2007, 07:55 PM
Hi everyone,
I am writing a page in PHP, and I wanted a simple titlebar maker. It take a command "yes" or "no" after each variable. Then the if command makes each title into the variable "$title". the $title in then later put into the html tag, <title>. Here is the code:
<?php
//title \|/Select yes only once
$general = "yes"
$games = "no"
$web_devop = "no"
$websites = "no"
$advert = "no"
$news = "no"
//page title
$pagetitle = "Home" //Enter the page title here
//DO NOT EDIT BELOW THIS POINT
$begintitle = "My Comany Name™ -- "
$gentitle = "MCN General"
$gamestitle = "MCN Games"
$web_devoptitle = "MCN Web Devopment"
$websitestitle = "MCN Websites"
$adverttitle = "MCN Adverts"
$newstitle = "MCN News"
//title printing
if ($general = "yes") {
$title = "$begintitle $pagetitle • $gentitle";
};
elseif ($games = "yes") {
$title = "$begintitle $pagetitle • $gamestitle";
};
elseif ($web_devop = "yes") {
$title = "$begintitle $pagetitle • $web_devoptitle";
};
elseif ($websites = "yes") {
$title = "$begintitle $pagetitle • $websitestitle";
};
elseif ($advert = "yes") {
$title = "$begintitle $pagetitle • $adverttitle";
};
elseif ($news = "yes") {
$title = "$begintitle $pagetitle • $newstitle";
};
else {
$title = "My Company Name";
};
//HTML/////////////////////////////////////////////PART 04
?>
<html>
<head>
<title>
<?php
$title
?>
</title>
</head>
<body>
Test
</body>
</html>
NOTE:
I changed the name of my company to "My Company Name" and "MCN" for short.
Let me answer some questions you might ask:
No error messages come up when uploaded
Uploaded to a PHP compatable server
Uploaded in ASCII format
Nothing showed up when page was loaded, not even the HTML code.
I will add a "thanks" to anyone whom is helpful to solving this script problem
Thanks!
I am writing a page in PHP, and I wanted a simple titlebar maker. It take a command "yes" or "no" after each variable. Then the if command makes each title into the variable "$title". the $title in then later put into the html tag, <title>. Here is the code:
<?php
//title \|/Select yes only once
$general = "yes"
$games = "no"
$web_devop = "no"
$websites = "no"
$advert = "no"
$news = "no"
//page title
$pagetitle = "Home" //Enter the page title here
//DO NOT EDIT BELOW THIS POINT
$begintitle = "My Comany Name™ -- "
$gentitle = "MCN General"
$gamestitle = "MCN Games"
$web_devoptitle = "MCN Web Devopment"
$websitestitle = "MCN Websites"
$adverttitle = "MCN Adverts"
$newstitle = "MCN News"
//title printing
if ($general = "yes") {
$title = "$begintitle $pagetitle • $gentitle";
};
elseif ($games = "yes") {
$title = "$begintitle $pagetitle • $gamestitle";
};
elseif ($web_devop = "yes") {
$title = "$begintitle $pagetitle • $web_devoptitle";
};
elseif ($websites = "yes") {
$title = "$begintitle $pagetitle • $websitestitle";
};
elseif ($advert = "yes") {
$title = "$begintitle $pagetitle • $adverttitle";
};
elseif ($news = "yes") {
$title = "$begintitle $pagetitle • $newstitle";
};
else {
$title = "My Company Name";
};
//HTML/////////////////////////////////////////////PART 04
?>
<html>
<head>
<title>
<?php
$title
?>
</title>
</head>
<body>
Test
</body>
</html>
NOTE:
I changed the name of my company to "My Company Name" and "MCN" for short.
Let me answer some questions you might ask:
No error messages come up when uploaded
Uploaded to a PHP compatable server
Uploaded in ASCII format
Nothing showed up when page was loaded, not even the HTML code.
I will add a "thanks" to anyone whom is helpful to solving this script problem
Thanks!