Urgent Help Required

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
RossDolan
Forum Commoner
Posts: 31
Joined: Tue Jul 19, 2011 5:44 am

Urgent Help Required

Post by RossDolan »

I have created a website but keep getting the following error message:

Notice: Undefined index: wp in E:\domains\a\alternativity.org.uk\user\htdocs\WorkingWW.php on line 13 (this is coming up on two of my pages)

Here is the code I was using:

Code: Select all

<link type="text/css" href="stylesheet.css" rel="stylesheet"/>
<div id="WWWINFO">
	<div id="NEWSLEFTCON">
		<div id="NEWSLEFT"><a href="WICPics.php"><img src="Images/WICPics.bmp" /></a><div id="SPLIT2"></div></div>
        <div id="NEWSLEFT"><a href="Index.php?p=wic&wc=ideas"><img src="Images/XmasTree.bmp"  /></a><div id="SPLIT2"></div></div>
		<div id="NEWSLEFT"><a href="//"><img src="Images/AltCard.jpg" /></a><div id="SPLIT2"></div></div>
	</div>
    <div id="WICMAINCON">
       		<?php
			
			$wpage = $_GET['wc'];
			
			if(!$wpage)
			{
				include 'WICTextIFrame.php';
			}
						
			if ($wpage == 'pics')(include 'WICPics.php');
			if ($wpage == 'ideas')(include 'WICIdeasIFrame.php');
			if ($wpage == 'aims')(include 'WICAimsIFrame.php');
			
			?>
	</div>
</div>
I am pretty new to all of this stuff so there may be something I am missing but any help would be greatly appreciated.

Cheers
Ross
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Urgent Help Required

Post by Celauran »

You're trying to use a variable that may not exist.

Code: Select all

$wpage = (isset($_GET['wc'])) ? $_GET['wc'] : NULL;
Post Reply