Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Parse error when I click on album Properties  (Read 3374 times)

0 Members and 1 Guest are viewing this topic.

iamcanadian

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Parse error when I click on album Properties
« on: November 27, 2003, 09:55:37 pm »

Error::

Code: [Select]
Parse error: parse error in /home/public_html/modules/coppermine/modifyalb.php on line 373

Line 373::

Code: [Select]
$lb = "<select name=\"album_listbox\" class=\"listbox\" onChange=\"if(this.options[this.selectedIndex].value) window.location.href='" $CPG_URL."&file=modifyalb&album='+this.options[this.selectedIndex].value;\">\n";

Code surrounding line 373 ::

Code: [Select]
if (mysql_num_rows($result) > 0 ){
               $lb = "<select name=\"album_listbox\" class=\"listbox\" onChange=\"if(this.options[this.selectedIndex].value) window.location.href='" $CPG_URL."&file=modifyalb&album='+this.options[this.selectedIndex].value;\">\n";
                while ($row = mysql_fetch_array($result)) {
                        $result2 = db_query("SELECT catname FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = '".$row['category']."'");
                        $row2 = mysql_fetch_array($result2);
                        $selected = ($row['aid'] == $album) ? "SELECTED" : "";
                        $lb .= "        <option value=\"" . $row['aid'] . "\" $selected>" . $row2["catname"] . " - " . $row['title'] . "</option>\n";
                }
Logged

iamcanadian

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Parse error when I click on album Properties
« Reply #1 on: November 27, 2003, 10:16:45 pm »

Nevermind! Fixed it! Someone else has posted their code (for an unrelated post), which included the line in question & it was different than mine. I replaced the code they had & it worked great! LOL!

I changed ::

Code: [Select]
$lb = "<select name=\"album_listbox\" class=\"listbox\" onChange=\"if(this.options[this.selectedIndex].value) window.location.href='" $CPG_URL."&file=modifyalb&album='+this.options[this.selectedIndex].value;\">\n";


To ::

Code: [Select]
$lb = "<select name=\"album_listbox\" class=\"listbox\" onChange=\"if(this.options[this.selectedIndex].value) window.location.href='$PHP_SELF?album='+this.options[this.selectedIndex].value;\">\n";
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 18 queries.