Urgent help needed on Wampsever error message
Posted by: bobby (---.dip0.t-ipconnect.de)
Date: March 28, 2010 11:21PM

Hi folks,

I am new to programming and have some problems with wampserver. I successfully installed wampserver 2.0 and its working quite well, but for the fact that when I preview my site i get this error message "Notice: Undefined index: page in C:\wamp\www\site\index.php on line ...." on several lines. This happens only on lines with php codes for example $page=$_GET['p']; I dont know if I have to configure something to make it work, or is it a compatibility problem with windows 7 Pro.

This does not happen when i run the site on my host on the internet.

Help me out, cos my brain is freezing. lol

Options: ReplyQuote
Re: Urgent help needed on Wampsever error message
Posted by: yfastud (Moderator)
Date: March 28, 2010 11:28PM

just as notice posted, you should define your var; if using some php scripts, open file php.ini through wamp tray icon

Find
error_reporting = E_ALL

Replace w/
error_reporting = E_ALL & ~E_NOTICE

Then save file and restart wamp

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Urgent help needed on Wampsever error message
Posted by: bobby (---.dip0.t-ipconnect.de)
Date: March 31, 2010 12:23PM

Hi,
Thanks for your contribution. Actually i did check the ini file and changed the error reporting as you put it, and it did work. Thanks a Zillion for that. I can now test and preview my pages locally.

Also I don't know if you could also be of help. I encoutered a problem with a login script i tried to program and here is the error message
Parse error: parse error in C:\wamp\www\site\loginen.php on line 21. here is the script

<?php
session_start();
$username = $_POST['username'];
$password = $_POST['password'];

include ("scripts/connect.php"winking smiley;

if ($username && $password);
{
// info is provided
$queryget = mysql_query("SELECT*FROM users WHERE usersname= '$username' AND password = '$password'"winking smiley;
$numrows = mysql_num_rows($queryget);
if ($numrows != 0)
{
$_SESSION['username'] = $username;
echo "You have been logged in";
}
else
echo "Your username was not found";
}
else
{
echo "You did not provide the proper info needed for login";
include ("scripts/connect.php"winking smiley;
}
?>

Options: ReplyQuote
Re: Urgent help needed on Wampsever error message
Posted by: yfastud (Moderator)
Date: March 31, 2010 11:34PM

if ($username && $password);
extra ;
btw, this forums for wamp so you might join some coding forums for future help w/ scripts winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.