Getting text in the title box in upload.php Getting text in the title box in upload.php
 

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]

Main Menu

Getting text in the title box in upload.php

Started by TheAgress0r, January 05, 2006, 10:27:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TheAgress0r

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

Nibbler

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

xplicit

Yups that's the little "bug" use:

if ($name=="title")

instead of:

if ($name="title")

Problem solved I think
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.