Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Positioning

Recommended Posts

I want to be bale to poistion certin parts of my code in specfic places. I need to be able to disaply this quickly. As a temp measure I have started and stopped php tags. Now normally this will disaply a php block on my dreamweaver. However it is not. Is there a reason why??

My code is;

PHP Code:

<?php     $db = @mysql_connect ("localhost","root","andy");         print "Database Connection gained";     echo '<br>';         mysql_select_db("disertation",$db);     $query = "SELECT questions.Question, questions.Option FROM questions";     $result = @mysql_query($query,$db);         while($row = @mysql_fetch_assoc($result))          {?>                       <?php               echo $row['Question'] . '<br>';            ?>                           <?php                    switch($row['Option'])               {                 case 'R':        ?>                        <?php                    echo "<input name='" . $row['Question'] . "' type='radio' value='radiobutton'>";                    echo '<br>';        ?>                <?php                    break;                 case 'T':        ?>                <?php                    echo "<input type='text' name='" . $row['Question'] . "'>";                    echo '<br>';                    break;               }          }?>
Thanks,kvarnerexpress

Share this post


Link to post
Share on other sites

From what I think you are trying to do, you need to have the code inside of the body tag. Then dreamweaver should display the blocks. But the other possibility is that you need to just put the code bits directly into the HTML using the "code" view in dreamweaver. I don't see why you can't do that in the first place...anyway, if you could elaborate on your question--as Tyssen suggested--that would be very helpful.

 

Good luck!

Share this post


Link to post
Share on other sites

I'am not sure the question you are asked :) , however, I have a try this. you may have to place some code in dreamweaver and that be a specific position on the page. if so, then you have insert the php code as usual. then you see a small icon acrhor that placed on you page. you can just cut and place this icon where you want it be. after that, you have the code in the right place. this is coz dreamweaver have't and can't support php parser, so it can't display it. if not, post message here. :) - hope this help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.