
November 4th, 2003, 06:48 PM
|
|
Contributing User
|
|
Join Date: Apr 2003
Posts: 187
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
|
function not called?
ok i have two pages, and both use similar functions for doing different things: one is a user reg/add/edit page, another, movie reg/add/edit page. It jsut checks to see what is beign done and then makes the query depending on that. it works fine in my users page, but the movie page says the function has not been called! here is a little bit of both:
PHP Code:
if($IsLoggedIn)
{
if(!$_POST)
{
if($userLvl == 3)
{
switch($_GET['strMethod'])
{ case "add":
adminAdd();
break;
case "edit";
adminEdit();
break;
case "delete";
deleteProfile();
break;
} } else {
if($details[0] == $_GET['userid'])
{ switch($_GET['strMethod'])
{ case "edit";
edit();
break;
case "delete";
deleteProfile();
break; } } else {
echo "You do not have the authorization to perform this function!"; } } } } else {
jump(); }
function adminAdd()
{
$GLOBALS['getuserinfo'] = mysql_query("SELECT * FROM users WHERE userid = " . $_GET['userid'] . " AND pending = 'yes'");
$GLOBALS['getpic'] = mysql_query("SELECT * FROM userpics WHERE userid = " . $_GET['userid'] . " AND pending = 'yes'");
$GLOBALS['button'] = "Add!";
$GLOBALS['title'] = "Add Pending User!";
}
//......
it continues sort of like that, butthe functions work... and then the movie one is almsot the same...
PHP Code:
if($IsLoggedIn&&$userLvl >= 2&&!$_POST)
{
include( $_SERVER['DOCUMENT_ROOT'] . 'prp/security/connectMovies.php');
switch($_GET['strMethod'])
{ case "add":
addMovie();
break;
case "edit";
editMovie();
break;
case "delete";
deleteMovie();
break;
}
function addMovie()
{
$GLOBALS['getmovieinfo'] = mysql_query("SELECT * FROM movieinfo WHERE movieid = " . $_GET['number'] . " AND pending = 'yes'");
//$GLOBALS['getpic'] = mysql_query("SELECT * FROM userpics WHERE userid = " . $_GET['number'] . " AND pending = 'yes'");
$GLOBALS['button'] = "Add!";
$GLOBALS['title'] = "Add Pending Movie!";
}
//...
this says function not called? why?
__________________
hey it's the CHARKING
|