Title: php / html code process
Last modified: August 30, 2016

---

# php / html code process

 *  [rbvinc](https://wordpress.org/support/users/rbvinc/)
 * (@rbvinc)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/php-html-code-process/)
 * Can somebody help me, how can I process this in wordpress as php/html.
    I put
   this as is, returning empty in ‘select’ section. Thanks,
 * _[ Moderator note: code fixed. Please wrap code in the backtick character or 
   [use the code button](http://codex.wordpress.org/Forum_Welcome#Posting_Code).]_
 *     ```
       <?php
       mysql_connect("localhost", "root", "password") or die("Connection Failed");
       mysql_select_db("company")or die("Connection Failed");
       $query = "SELECT * FROM COMPANIES order by COMPANYNAME";
       $result = mysql_query($query);
       ?> 
   
       <select name='company'>
       <option value="">Select</option>
   
       <?php while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { ?>
       <option value="<?php echo $line['COMPANYNAME'];?>"> <?php echo $line['COMPANYNAME'];?> </option>   <?php } ?> 
   
       </select>
       ```
   

The topic ‘php / html code process’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 0 replies
 * 1 participant
 * Last reply from: [rbvinc](https://wordpress.org/support/users/rbvinc/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/php-html-code-process/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
