SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict ARSA's Avatar
    Join Date
    Apr 2003
    Location
    San Juan, Puerto Rico
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Variable Problem ?

    Ok, I知 working on a edit item script, which is running pretty fine, but I知 having a problem with all the drop down list after all the info is displayed in the page...

    Instead of displaying the info from the database, it only prints
    <?= $variable_name ?> inside the drop down list as selected item...

    Again...

    I知 using this,

    <?= $variable_name ?> inside the inputs to get the info from a database...

    Ok the problem is that <?= ?> doesn't seem to work with the drop down list???

    How can I make a drop down list that display the same info inside the database?

    This is an example http://www.bsinternationalstock.com/fix2.php?id=100
    Also you can visit the http://www.bsinternationalstock.com/fix.php and select other products.
    Remember that I want the others options to be available, in case I have to make a change by selecting, other option from the list...

    Thanks!
    "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - Albert Einstein

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Let's see some code.
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    Now with customized title Jump's Avatar
    Join Date
    Sep 2002
    Location
    The Restaurant at The End of The Universe
    Posts
    1,423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well here is one of mine if that helps.

    PHP Code:
        <tr>
         <td
          align="center"><select
          style="color: #ffcc33; background-color: #000000;"
          onchange="return(FORMSubmit(this.form));"
          name='station'
          size='11''>
         <?
         
    while ($row mysql_fetch_assoc($result_station)) {
          
    $station $row['name'];
          
    ?>
          <option
           value='<?php echo $station?>'><?php echo ucwords($station)?></option>
          <?
          
    }
          
    ?></select></td>
        </tr>

  4. #4
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Why exit php mode at all?

    PHP Code:
        <tr>
         <td
          align="center"><select
          style="color: #ffcc33; background-color: #000000;"
          onchange="return(FORMSubmit(this.form));"
          name='station'
          size='11'>
         <?
         
    while ($row mysql_fetch_assoc($result_station)) {
          
    $station $row['name'];
          echo 
    '<option value="' $station '">' ucwords($station) . '</option>';
          }
          
    ?></select></td>
        </tr>
    Mike
    It's not who I am underneath, but what I do that defines me.

  5. #5
    Now with customized title Jump's Avatar
    Join Date
    Sep 2002
    Location
    The Restaurant at The End of The Universe
    Posts
    1,423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because I like to. Not wrong, not right, it's a matter of preferance.

  6. #6
    SitePoint Addict ARSA's Avatar
    Join Date
    Apr 2003
    Location
    San Juan, Puerto Rico
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its ok, guys I already figure what was the problem... dreamweaver was messing with my code, changing the <? ?> by &lt;?= ?&lt; ... thanxs anyways ... and by the way, what is that code for again :::X
    "I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - Albert Einstein


Bookmarks

Posting Permissions

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