Jump to content
MakeWebGames

function error


R!der
 Share

Recommended Posts

I am trying to make it so i can add/edit/delete crimes via the admin panel but i seem to get this error

 

Fatal error: Call to undefined function: crimegroup_dropdown() in /******/*********/******/admin.php on line 2000

This is line 2000

 

Crime Group: ".crimegroup_dropdown($c,'crimeGROUP')."

 

Does anyone know what this error means and how i can fix it?

Link to comment
Share on other sites

Re: function error

Gangs

 

function gang_dropdown($connection,$ddname="gangs",$selected=-1) 
{ 
$ret="<select name='$ddname' type='dropdown'>"; 
$q=mysql_query("SELECT * FROM gangs ORDER BY gangNAME ASC",$connection); 
if($selected == -1) { $first=0; } else { $first=1; } 
while($r=mysql_fetch_array($q)) 
{ 
$ret.="\n<option value='{$r['gangID']}'"; 
if ($selected == $r['gangID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } 
$ret.= ">{$r['gangNAME']}</option>"; 
} 
$ret.="\n</select>"; 
return $ret; 
} 

 

Cars

 

function cars_dropdown($connection,$ddname="cars",$selected=-1) 
{ 
$ret="<select name='$ddname' type='dropdown'>"; 
$q=mysql_query("SELECT * FROM cars_types ORDER BY carNAME ASC",$connection); 
if($selected == -1) { $first=0; } else { $first=1; } 
while($r=mysql_fetch_array($q)) 
{ 
$ret.="\n<option value='{$r['carID']}'"; 
if ($selected == $r['carID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } 
$ret.= ">{$r['carNAME']}</option>"; 
} 
$ret.="\n</select>"; 
return $ret; 
}

 

they both depend on the structure of your db though

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...