Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Parse error when I click on album Properties  (Read 3376 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.017 seconds with 19 queries.