[thelist] php - displaying default data

Travis tr at hl-productions.com
Wed Jan 28 16:23:35 CST 2004

I'm fairly new to PHP (figure I'd get that out of the way first) and I am
having a bit of a problem getting it to display data when you first enter
the page. This is probably something simple but I've spent several hours
searching and haven't come up with anything. All the answers I can find deal
with forms or with a SQL of some sort. I'm not interfacing with either. What
I want it to do is when you first enter the page, such as
mydomain.com/blog.php,  it will show a default specified data in a table.

Here are the errors I'm gettting:

  Notice: Undefined index: month
  Notice: Undefined index: year

  Once you choose a link, it works fine. Here's my php code that works fine:

    $monthTemp = $_GET["month"];
    $yearTemp = $_GET["year"];
    include( "blog/$yearTemp/$monthTemp.php" );

I know I need some sort of  IF...ELSE statement but do I have to set up some
a session or use $PHP_SELF in some way? Thanks in advance.


More information about the thelist mailing list