PDA

View Full Version : eh ho!


JustWilliam
04-05-2003, 01:18 PM
I am currently designing my own website but i have come to strugle with the fowlling code and in advance thanks for your help.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<!-- Style Sheet-->
<link rel="stylesheet" type="text/css" href="style.css">
</style>
<title>*Just William*-The Site<- </title>
<meta name="keywords" content="William, keyboard, cybot, music, personal, site, just william">
<meta name="description" content="Explore the wonderful world of William Smith only at Just William the site.">
<meta name="rating" content="General">
<meta name="expires" content="never">
<meta name="language" content="english">
<meta name="charset" content="ISO-8859-1">
<meta name="distribution" content="Global">
<meta name="robots" content="INDEX,FOLLOW">
<meta name="revisit-after" content="7 Days">
<meta name="email" content="williamjamesmith@hotmail.com">
<meta name="author" content="William Smith">
<meta name="copyright" content="2003"><title>*Just William*->The Site<-</title>
<meta name="keywords" content="William, keyboard, cybot, music, personal, site, just william">
<meta name="description" content="Explore the wonderful world of William Smith only at Just William the site.">
<meta name="rating" content="General">
<meta name="expires" content="never">
<meta name="language" content="english">
<meta name="charset" content="ISO-8859-1">
<meta name="distribution" content="Global">
<meta name="robots" content="INDEX,FOLLOW">
<meta name="revisit-after" content="7 Days">
<meta name="email" content="williamjamesmith@hotmail.com">
<meta name="author" content="William Smith">
<meta name="copyright" content="2003">
</head>


<body text="#0080FF" link="#0000A0" vlink="Blue" alink="Aqua">
<?php
$_GET['title'];
$_title['home.txt'];
?>
<table height="100%">
<tr>
<!--Margin Starts Here-->
<td width="237px" bgcolor="#0080FF">
<img src="../images/logo.gif" width="237" height="200" border="0"><br>
<?php
include 'menu.txt'
?>
</table>
</td>
<!--Header Table Ends and Margin -->
<!--Main Body Script Goes Here-->
<td valign="top"><img src="../images/logoheader.gif" width="532" height="200" border="0"Main</td>
<!--Main Body Ends-->
</tr>
</table>

</body>
</html>

and the menu

<!--Header Table Begins-->
<table width="200px" border="2px" align="center" bgcolor="Navy" bordercolor="Navy">
<tr>
<th><font size="4" color="#0080FF" face="Arial Black">Site Channels</font></th>
</tr>
<tr>
<td colspan="2" bgcolor="Aqua"><font color="#0080FF" face="Arial">Home<br>Abouts Us<br>Jus' Cybor<br>Mellow Pages<br>Will's Studio</font></td>
</td>

</tr>
</table><br>
<!--Include Side Menu V1BETA.
WARNING $title needs to printinted on each page
using Template V2BETA-->
<?php
include '$_title';
?>
<!--Interact Menu-->
<table width="200px" border="2px" align="center" bgcolor="Navy" bordercolor="Navy">
<tr>
<th><font size="4" color="#0080FF" face="Arial Black">Interact</font></th>
</tr>
<tr>
<td colspan="2" bgcolor="Aqua"><font color="#0080FF" face="Arial">Fourum<br></font></td>
</td>

</tr>
</table><br>
<!--Guest Book-->
<table width="200px" border="2px" align="center" bgcolor="Navy" bordercolor="Navy">
<tr>
<th><font size="4" color="#0080FF" face="Arial Black">Guest Book</font></th>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="Aqua"><!-- \/ GuestGEAR Code by http://htmlgear.com \/ -->
<a href="http://htmlgear.lycos.com/specs/guest.html"><img border=0 ismap src="http://htmlgear.lycos.com/img/guest/gb_blue.gif"></a><br>
<a href="http://htmlgear.tripod.com/guest/control.guest?u=just_william_1&i=2&a=view"><font face="arial,helv,helvetica,sans serif" size=-1>View My Guestbook</font></a><br>
<a href="http://htmlgear.tripod.com/guest/control.guest?u=just_william_1&i=2&a=sign"><font face="arial,helv,helvetica,sans serif" size=-1>Sign My Guestbook</font></a><br>
<!-- /\ End GuestGEAR Code /\ --></td>
</td>

</tr>

an erro occurs when it trues to open $_title

jigal
04-06-2003, 05:51 AM
What exactly is this:
<?php
$_GET['title'];
$_title['home.txt'];
?>
supposed to do?

$_GET['title'] is not a command but can be used in the following way:
suppose your page is called index.php. If you browse to http://domain.tld/index.php?title=plaap
then your script can read the data that was sent in the query-string by reading from the $_GET array. In this case
echo $_GET['title'];
would produce: plaap

$_title['home.txt'] would attempt to read from the array $_title the value at the index 'home.txt', but the value is not assigned to any variable.

The reason why these lines do not produce an error is that the syntax itself is not incorrect. PHP just evaluates the expressions and gets the resulting values (twice an empty string presumably).

Jigal.

JustWilliam
04-06-2003, 11:22 AM
tank you for your help, i am just starting to learn php.