dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: php question

  1. #1
    Senior Member
    Join Date
    Aug 2000
    Location
    Seoul, South Korea
    Posts
    1,310
    Hi Guys,
    As you can see in my script i am calling on

    value=\"{$row['band_name']}\"

    to be displayed in my text input field.
    What i want to know is how do you do the same for a <textarea>? Where do i put the script?

    echo "<form method=post action=\"add_result_band.php\">";
    echo "Band Name:<br>";
    echo "<input type=text name=band_name maxlength=30 size=25 value=\"{$row['band_name']}\"><br><br>";
    echo "Members:<br>";
    echo "<textarea name=members cols=25 rows=5></textarea><br><br>";

    Cheers,
    micmac

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    echo "<textarea name=members>{$row['band_name']}</textarea>"

    musicman

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    Seoul, South Korea
    Posts
    1,310
    Thanks for the reply Musicman....what about for:

    echo "<font face=Verdana, Arial size=2 color=red><b>Genre:</b></font><br>";
    echo "<select name=genre>";
    echo "<option selected value=Rock>ROCK</option>";
    echo "<option value=Hip Hop>HIP HOP</option>";
    echo "<option value=Indy>INDY</option>";
    echo "<option value=Techno>TECHNO</option>";
    echo "<option value=Pop>POP</option>";
    echo "</select><br><br>";

    and.....

    echo "<font face=Verdana, Arial size=2 color=red><b>Picture (Thumb):</b></font><br>";
    echo "<input type=file name=picture_thumb size=25 maxlength=250><br><br>";

    Cheers,
    micmac

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    I replied to a thread by aversion yesterday - another dropdown list....
    and you could even add some more code to show the mini pic - and even allow a mini swf

    Musicman

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Seoul, South Korea
    Posts
    1,310
    I still can't get:

    echo "<input type=file name=picture_thumb size=25 maxlength=250><br><br>";

    to show the value...where would i put {$row['band_name']}

    Cheers,
    micmac





  6. #6
    they call me the_jump... le_saut's Avatar
    Join Date
    Mar 2001
    Posts
    536
    G'day micmac :

    PHP RULE 1:

    Don't stick static HTML code in PHP tags, ie don't echo or print it... the PHP interpreter is not there to render HTML code, that's what the browser (User Agent) is for....
    Putting Static HTML in PHP tags puts unecessary work on the server..

    The good way to do this to keep your PHP interpreter happy is to
    ##end this PHP
    ?>

    <option selected value="<?echo $value?>"><?echo $displayedValue?></option>

    <? ##start new PHP

    this will make your PHP scripts (espec long ones) run much faster.

    cheers
    James


    Originally posted by micmac
    Thanks for the reply Musicman....what about for:

    echo "<font face=Verdana, Arial size=2 color=red><b>Genre:</b></font><br>";
    echo "<select name=genre>";
    echo "<option selected value=Rock>ROCK</option>";
    echo "<option value=Hip Hop>HIP HOP</option>";
    echo "<option value=Indy>INDY</option>";
    echo "<option value=Techno>TECHNO</option>";
    echo "<option value=Pop>POP</option>";
    echo "</select><br><br>";

    and.....

    echo "<font face=Verdana, Arial size=2 color=red><b>Picture (Thumb):</b></font><br>";
    echo "<input type=file name=picture_thumb size=25 maxlength=250><br><br>";

    Cheers,
    micmac

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center