Simple PHP web site

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
edbmaster
Forum Newbie
Posts: 2
Joined: Thu Jul 14, 2005 9:22 pm

Simple PHP web site

Post by edbmaster »

I'm trying to create a simple 3 page web site using PHP.

I have 5 files such as bellow. However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well). Any sugestions would be greately appreciated.

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width="120">

               < ?php
               require("menu.inc")
               ?>

            </td>
            <td valign="top">

               < ?php
                  if ($c != "") {
                     include("content".$c.".php");
                  } else {
                     include("content1.php");
                  }
               ?>

            </td>
         </tr>
      </table>

      < ?php
            require("footer.php");
      ?>

   </body>
</html>
ng PHP.

I have 5 files such as bellow. However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well). Any sugestions would be greately appreciated.

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quote;top&quote;&gt;

               &lt; ?php
                  if ($c != &quote;&quote;) {
                     include(&quote;content&quote;.$c.&quote;.php&quote;);
                  } else {
                     include(&quote;content1.php&quote;);
                  }
               ?&gt;

            &lt;/td&gt;
         &lt;/tr&gt;
      &lt;/table&ampw.  However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

&lt;img src="images/logo.gif" width="150" height=&quote;100&quote; alt=&quote;Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quote;top&quote;&gt;

               &lt; ?php
                  if ($c != &quote;&quote;) {
                     include(&quote;content&quote;.$c.&quote;.php&quote;);
                  } else {
                     include(&quote;content1.php&quote;);
                  }
               ?&gt;

         the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src=&quote;images/logo.gif&quote; width=&quote;150&quote; height=&quote;100&quote; alt=&quote;Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quote;top&quote;&gt;

               &lt; ?php
                  if ($c != &quote;&quote;) {
                     include(&quote;content&quote;.$c.&quote;.php&quote;);
                  } else {
                     include(&quote;content1.php&quote;);
                  }
               ?&gt;

            &lt;/td&gt;
         &anavigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quotte a simple 3 page web site using PHP. 

I have 5 files such as bellow.  However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

&lt;img src=&quote;images/logo.gif&quote; width=&quote;150&quote; height=&quote;100&quote; alt=&quote;Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quote;top&quote;&gt;

               &lt; ?php
                  if ($c != &quote;&quote;) {
                     include(&quote;content&quote;.$c.&quote;.php&quote;);
                  } else {
                     include(&quote;content1.php&quote;);
                  }
               ?&gt;

            &lt;/td&gt;
         &lt;/tr&gt;
      &lt;/table&gt;

      &lt; ?php
            require(&quote;footer.php&quote;);
      ?&gt;

   &lt;/body&ampte a simple 3 page web site using PHP. 

I have 5 files such as bellow.  However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width=&ampp;quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width="120">

               < ?php
               require(&q

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3&quote;&gt;Page #3&lt;/a&gt;&lt;br /&gt;
&lt;/p&gt;
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.phpow.  However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &aick on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quote;top&quote;&gt;

               &lt; ?php
                  if ($c != &quote;&quote;) {
                     include(&quote;content&quote;.$c.&quote;.php&quote;);
                  } el

I have 5 files such as bellow.  However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100&quote; alt=&quote;Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quo ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height=&quote;100&quote; alt=&quote;Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width="120">

               < ?php
               require("menu.inc")
               ?>

            </td>
            <td valign="top">

               < ?php
                  if ($c != "") {
                     include("content".$c.".php");
                  } else {
                     include("content1.php");
                  }
               ?>

            </td>
         </tr>
      </table>

      < ?php
            require("footer.php");
      ?>

   &quote;images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width= page web site using PHP. 

I have 5 files such as bellow.  However, when I click on the navigation links in the menu.php file, they don't point to anything but to content1.php ( I do have content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&aestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width=&quote;150&quote; height=&quote;100&quote; alt=&quote;Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width="120">

               < ?php
               require("menu.inc")
               ?>

            </td>
            <td valign="top">

               < ?php
                  if ($c != "") {
                     include("content".$c.".php");
                  } else {
                     include("content1.php");
                  }
               ?>

            </td>
         </tr>
      </table>

      < ?php
            require("footer.php");
      ?>

   </body>
</html&gp;quote; width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width="120">

               < ?php
               require("menu.inc")
               ?>

            </td>
            <td valign="top">

               < ?php
                  if ($c != "") {
                     include("content".$c.".php");
                  } else {
                     include("content1.php");
                  }
               ?>

            </td>
         </tr>
      </table>

      < ?php
            require("footer.php");
      ?>

   </body>
</html>
mp;quote;all"/>

2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   &am content2.php and content3.php as well).  Any sugestions would be greately appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc.&quote; align=&quote;left&quote; hspace=&quote;20&quote;/&gt;
&lt;h1 style=&quote;font:bold 2em sans-serif;color:#cc9933;text-align:center;&quote;&gt;
   Sample Industries, Inc.
&lt;/h1&gt; &lt;br clear=&quote;all&quote;/&gt;
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;Sample Industries Incorporated&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;

      &lt; ?php
            require(&quote;header.php&quote;);
      ?&gt;

      &lt;table width=&quote;95%&quote; cellspacing=&quote;15&quote; cellpadding=&quote;5&quote; border=&quote;0&quote;&gt;
         &lt;tr&gt;
            &lt;td valign=&quote;top&quote; width=&quote;120&quote;&gt;

               &lt; ?php
               require(&quote;menu.inc&quote;)
               ?&gt;

            &lt;/td&gt;
            &lt;td valign=&quote;top&quote;&gt;

               &lt; ?php
                  if ($c != &quote;&quote;) {
                     include(&quote;content&quote;.$c.&quote;.php&quote;);
                  } else {
                     include(&quote;content1.php&quote;);
                  }
               ?&gt;

            &lt;/td&gt;
         &lt;/tr&gt;
      &lt;/table&appreciated.  

1-header.php

Code: Select all

<img src="images/logo.gif" width="150" height="100" alt="Sample Industries, Inc." align="left" hspace="20"/>
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

<h2 style="font:1.5em serif;color:#cc0000;">
   Welcome to Our Home Page!
</h2>
<p style="font:.9em sans-serif;color:#000000">
   This site has been built dynamically using PHP, an open-source embedded programming language designed to make a webmaster's life easier!
</p>
<p style="font:.9em sans-serif;color:#000000">
   Using PHP can greatly reduce the amount of time a webmaster has to spend building and especially updating or maintaining a site. With server-side includes, a webmaster only has to change a single document to change a feature across an entire web site!
</p>
5-index.php

Code: Select all

<html>
   <head>
      <title>Sample Industries Incorporated</title>
   </head>
   <body>

      < ?php
            require("header.php");
      ?>

      <table width="95%" cellspacing="15" cellpadding="5" border="0">
         <tr>
            <td valign="top" width="120">

               < ?php
               require("menu.inc")
               ?>

            </td>
            <td valign="top">

               < ?php
                  if ($c != "") {
                     include("content".$c.".php");
                  } else {
                     include("content1.php")amp;gt;
<h1 style="font:bold 2em sans-serif;color:#cc9933;text-align:center;">
   Sample Industries, Inc.
</h1> <br clear="all"/>
2-menu.php

Code: Select all

<p align="center" style="font:bold 1em sans-serif;color:#000099">
   <a href="index.php?c=1">Home Page</a><br />
   <a href="index.php?c=2">Page #2</a><br />
   <a href="index.php?c=3">Page #3</a><br />
</p>
3-footer.php

Code: Select all

<p align="center" style="font:bold .7em sans-serif;color:#000000">
   Copyright ©2001 Sample Industries, Inc.
   <br />
   Site created by <a href="http://www.jwweb.com">JWWeb Design</a>
</p>
4-content1.php

Code: Select all

&lt;h2 style=&quote;font:1.5em serif;color:#cc0000;&quote;&gt;
   Welcome to Our Home Page!
&lt;/
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Probably your webhost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET&#1111;'c']) &amp;&amp; $_GET&#1111;'c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
ister_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET&#1111;'c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset(uld modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  inclost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET&#1111;'c']) &amp;&amp; $_GET&#1111;'c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(ost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
;& in_array($_GET['c'], $allowed)) {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}
g...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("conthat you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$alloweobals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
mp;amp; $_GET['c'] != '') {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
nt1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
onfigured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
ontent". $_GET['c'] .".php");
} else {
include("content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
;quote;content1.php");
}
$_GET['c'] != '') {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET&1111;'c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
et($_GET['c']) && in_array($_GET['c'], $allowed)) {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}
ost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
[/ improvement

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
egister_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include(]) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET& {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include(&quamp; $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&q

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
te;content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
ans that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
figured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
hp]

Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) &&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GET['c'] .".php");
} else {
  include(&qost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET&#1111;'c']) && $_GET['c'] != '') {
  include("content". $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} emp;amp; $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

[pwhich is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET&#1111;'c']) &amp;&amp; $_GET&#1111;'c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
[/php1111;'c']) && $_GET&#1111;'c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
ost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include(&q&& $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
93]
if (isset($_GET['c']) && $_GET['c'] != '') {
include("content". $_GET['c'] .".php");
} else {
include("content1.php&quote;);
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
, $allowed)) {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}
2e7b693]

Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
T['c']) && $_GET['c'] != '') {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
ost has php configured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quood thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

[php:1:bith register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
ovement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) &&isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $a modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
egister_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} el_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_t also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
he first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
mp;quote;);
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Onlhp

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
#1111;'c']) && $_GET['c'] != '') {
include("content". $_GETї'c'] .&quote;.php&quote;);
} else {
include(&quote;content1.php&quote;);
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
eans that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GET&#1111uld modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

[phpls=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .&ac']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GE1]

Btw, here is the first improvement

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) &&amp; in_array($_GET&#1111;'c'], $allowed)) {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  inclu which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
amp;quote;);
} else {
include("content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} egured with register_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
;quote;content". $_GET['c'] .".php");
} else {
include("content1.php&quote;);
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.ph_globals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and ') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
e("content". $_GET['c'] .".php");
} else {
include("content1.php");
}
bals=off, which is a good thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET&#1111;'c']) &amp;&amp; in_thing...

It also means that you should modify index.php

Code: Select all

if (isset($_GET&#1111;'c']) &amp;&amp; $_GET&#1111;'c'] != '') {
  include(&quote;content&quote;. $_GET&#1111;'c'] .&quote;.php&quote;);
} else {
  include(&quote;content1.php&quote;);
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("contGET['c']) && $_GET['c'] != '') {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
if (isset($_GET['c']) && $_GET['c'] != '') {
include("content". $_GET['c'] .".php");
} else {
include("content1.php");
}


Btw, here is the first improvement ;)

Code: Select all

$allowed = array('1', '2', '3'); // Only content1.php, content2.php and content3.php are allowed 

if (isset($_GET['c']) && in_array($_GET['c'], $allowed)) {
  include("content". $_GET['c'] .".php");
} else {
  include("content1.php");
}
edbmaster
Forum Newbie
Posts: 2
Joined: Thu Jul 14, 2005 9:22 pm

Post by edbmaster »

Thank you much for your time, it all works now just fine....I'm just trying to understand why the other way did not work!!!....
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

because if register_globals is off, then you must specify the variable type: ie $_POST, $_GET, $_SESSION, $_COOKIE, etc.
User avatar
phpdevuk
Forum Contributor
Posts: 220
Joined: Mon Jul 04, 2005 5:31 am
Location: UK
Contact:

Post by phpdevuk »

As burrito said if register globals is turned of in the php settings then variables do not get automatically assigned, you have to specify what they are eg; post, get etc

see http://uk.php.net/register_globals for more details
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

it has to do with security and the like, that is why global variables are turned off by default in php now.
Post Reply