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

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

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.