coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: TheAgress0r on January 05, 2006, 10:27:00 PM

Title: Getting text in the title box in upload.php
Post by: TheAgress0r 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..
Title: Re: Getting text in the title box in upload.php
Post by: Nibbler on January 05, 2006, 11:56:02 PM
To compare 2 values you use ==. A single = justs sets one to the other.
Title: Re: Getting text in the title box in upload.php
Post by: xplicit 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