Author Topic: Problem in CP  (Read 4046 times)

0 Members and 1 Guest are viewing this topic.

Offline idijotaz

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • CLON Entertainment
Problem in CP
« on: September 17, 2006, 08:41:38 PM »
When i load member.php file (control panel) im getting error at top. Im getting that error after transfered my site to other hosting
Code: [Select]
Warning: Invalid argument supplied for foreach() in /mounted-storage/home28b/sub003/sc25579-ZTFF/funnylive.net/includes/functions.php on line 1444
in that line:
Code: [Select]
foreach ($val[3] as $item) {

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Problem in CP
« Reply #1 on: September 17, 2006, 10:02:23 PM »
10 lines above and below that line please.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline infectedin

  • Pre-Newbie
  • Posts: 1
    • View Profile
    • Funny Videos, Funny Pictures, Funny Flach...
Re: Problem in CP
« Reply #2 on: September 17, 2006, 10:33:59 PM »
Code: [Select]
//--- DB Field Dropdown ---
function get_db_fields_dropdown($key, $val, $value) {
$dropdown = "<SELECT name=\"".$key."\" onkeypress=\"if(window.event.keyCode==13)this.form.submit();\" class=\"select\">";
$i = 0;
foreach ($val[3] as $item) {
  $what = ($val[4]) ? $item : $i;
$dropdown .= "<option value=\"".$what."\"".(($value == $what) ? " selected" : "").">".$item."</option>\n";
$i++;
}
$dropdown .= "</select>\n";
  return $dropdown;
}
//--- End DB Field Dropdown ---

Offline idijotaz

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • CLON Entertainment
Re: Problem in CP
« Reply #3 on: September 26, 2006, 03:49:45 PM »
so any idead? infectedin wrote that lines

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Problem in CP
« Reply #4 on: September 27, 2006, 02:25:49 AM »
check your db_field_definitions.php
whatever field is using dropdown type, does not provide the array with the items for the dropdown.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)