Parse error when I click on album Properties Parse error when I click on album Properties
 

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

Main Menu

Parse error when I click on album Properties

Started by iamcanadian, November 27, 2003, 09:55:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iamcanadian

Error::

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

Line 373::

$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 ::

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";
                }

iamcanadian

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 ::

$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 ::

$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";