#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Hello,

    I've got a form with several select Menus which contain options that I retrieve from a sybase database. I thougt everytime I need to print the menu I wrap the option tag in php and println it out. But I recognized that the second php-Block is not executed when I tested an echo in that block. Thank you very much for the input.
  2. #2
  3. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    You can have as many separate blocks of PHP code in a page as you want as long as you enclose each instance in php script tags. You can even drop in and out of PHP parsing inside a function or a loop:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>

    <SELECT name="whatever">

    <?

    while($r = mysql_fetch_array($result)){

    ?><option value="<? echo $r["column1"] ?>"><? echo $r["column2"] ?></option>

    }

    ?>

    </SELECT>[/code]

    (Should work the same for Sybase)

    However, AFAIK, PHP doesn't have a println function, just echo, print, and printf.

    [This message has been edited by rycamor (edited October 13, 2000).]

Similar Threads

  1. Can php be used in html files
    By emzyme in forum PHP Development
    Replies: 3
    Last Post: January 29th, 2004, 01:50 PM
  2. all-in-one php script displaying html
    By emzyme in forum PHP Development
    Replies: 5
    Last Post: January 27th, 2004, 07:07 AM
  3. php n00b. Put a php file into an html template?
    By WorldBuilder in forum PHP Development
    Replies: 3
    Last Post: January 25th, 2004, 08:48 PM
  4. How to get client email??Help plz
    By Gecko22 in forum ASP Programming
    Replies: 12
    Last Post: January 22nd, 2004, 01:40 PM
  5. not returning records when it should
    By aliaga61 in forum ASP Programming
    Replies: 3
    Last Post: January 16th, 2004, 10:57 AM

IMN logo majestic logo threadwatch logo seochat tools logo