Hi folks
I've just moved my site and databases into easyphp WAMP (first time I've ever used it).
I got everything in but I'm seeing errors in the local site I don't get (or are hidden) on the live site.
For example I'm getting this error:
Notice: Undefined index: email in C:\web\gbpc\login.php on line 6
from this code:
<?php
/*
Created By Adam Khoury @ www.flashbuilding.com
-----------------------June 20, 2008-----------------------
*/
if ($_POST['email']) {
//Connect to the database through our include
include_once "connect_to_mysql.php";
$email = stripslashes($_POST['email']);
$email = strip_tags($email);
$email = mysql_real_escape_string($email);
$password = ereg_replace("[^A-Za-z0-9]", "", $_POST['password']); // filter everything but numbers and letters
$password = md5($password);
// Make query and then register all database data that -
// cannot be changed by member into SESSION variables.
// Data that you want member to be able to change -
// should never be set into a SESSION variable.
$sql = mysql_query("SELECT * FROM members WHERE email='$email' AND password='$password' AND emailactivated='1'");
$login_check = mysql_num_rows($sql);
I also have this error appearing on lines 107,108,109 & 110:
Notice: Undefined variable: bonusGROUPED in C:\web\gbpc\includes\finalists.php on line 107
Notice: Undefined variable: pointsGROUPED in C:\web\gbpc\includes\finalists.php on line 108
Notice: Undefined variable: totalpointsGROUPED in C:\web\gbpc\includes\finalists.php on line 109
Notice: Undefined variable: playedGROUPED in C:\web\gbpc\includes\finalists.php on line 110
from this section of code:
foreach ($arr as $key => $row) { // THIS SECOND LOOP BUILD AN ARRAY FOR EACH PRSON AT EACH VENUE
// ADDING THE POINTS FOR EACH VENUE AND ADDING THE NUMBER OF TIMES
// PLAYED AT EACH VENUE. BEAUTY
$bonusGROUPED[$row[1].$row[2].$row[3]] = $bonusGROUPED[$row[1].$row[2].$row[3]] + $row[4] + $row[5]; //grouped data with bonus chips
$pointsGROUPED[$row[1].$row[2].$row[3]] = $pointsGROUPED[$row[1].$row[2].$row[3]] + $row[6]; //creates grouped data for each player with points
$totalpointsGROUPED[$row[1].$row[2].$row[3]] = $totalpointsGROUPED[$row[1].$row[2].$row[3]] + $row[4] + $row[5] + $row[6];//creates grouped data for each player with points
$playedGROUPED[$row[1].$row[2].$row[3]] = $playedGROUPED[$row[1].$row[2].$row[3]] +1; //creates grouped data for number of times played
$GBPCPoints = $totalpoints33GROUPED[$row[1].$row[2].$row[3]] * $average_by_venue[$row[3]] / 20; // calculates number of chips
$CHIPS = ceil($GBPCPoints / 25) * 25; //rounds up chipstack to nearest 25
$arrGROUPED[$row[1].$row[2].$row[3]] = array(1 => $row[1], 2 => $row[2], 3 => $row[3], 4 => $bonusGROUPED[$row[1].$row[2].$row[3]], 5 =>$pointsGROUPED[$row[1].$row[2].$row[3]], 6 => $totalpointsGROUPED[$row[1].$row[2].$row[3]], 7 => $playedGROUPED[$row[1].$row[2].$row[3]], 8 =>$CHIPS); //creates new array combining all the above data
}
I'm pretty new to php and have inherited most of this code, the above are just small sections but I can attach the full code if needed.
Any help would be greatly appreciated.