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: Getting text in the title box in upload.php  (Read 4417 times)

0 Members and 1 Guest are viewing this topic.

TheAgress0r

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Getting text in the title box in upload.php
« on: January 05, 2006, 10:27:00 pm »

Hi.. I want to get the text "TITLE by NICK" in the title textbox on the upload page.

So this is what I've done:

Quote
    // Create a text box.
    if ($name="title") {
        $value = "TITEL by NICK";
    } else {
        $value = "";
    }

    echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        $text  $ordinal
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="$name" maxlength="$max_length" value="$value" class="textinput">
                </td>
        </tr>

EOT;
    }
}

I must have missed something 'cause I also get the text in the keywords textbox. Could you pls tell me what I did wrong?

Thx..
Logged

Nibbler

  • Guest
Re: Getting text in the title box in upload.php
« Reply #1 on: January 05, 2006, 11:56:02 pm »

To compare 2 values you use ==. A single = justs sets one to the other.
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: Getting text in the title box in upload.php
« Reply #2 on: January 08, 2006, 02:35:03 am »

Yups that's the little "bug" use:

if ($name=="title")

instead of:

if ($name="title")

Problem solved I think
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.