Expand|Select|Wrap|Line Numbers
- <body>
- <form name='theForm'>
- <center>
- <table border='1' cellpadding="2" cellspacing="1">
- <tr>
- <th bgcolor='#FFF0C4' colspan="2">Send mails to User or Domain Owners </th></tr>
- <tr>
- <td align="right">Send Mail To</td>
- <td><input type="radio" name="send_mail" id="send_mail" value="users" class="rad" checked="checked" onclick="setList()"/>Users
- <input type="radio" name="send_mail" id="send_mail" value="owners" class="rad" onclick="setList()">Domain Owners</td></tr>
- <tr>
- <td align="right">List</td>
- td><select name="list" class="drop" id="drop" style="width:150px">
- <script type="text/javascript">
- function setList(ch)
- {
- $link = mysql_connect('localhost','root','');
- if(!$link)
- {
- die('could not connect'.mysql_error());
- }
- mysql_select_db('codeigniter',$link);
- $query = mysql_query("SELECT * from admin_mailer");
- //echo 'connected successfully';
- if(mysql_num_rows($query))
- { //atleast one user
- while($row = mysql_fetch_array($query))
- {
- //$usr = $query['user'];
- //echo $usr;
- //print("<option value=\"row[0]\">$row[0]</option>");
- echo $row[0];
- ?><option value=""><?php echo $row[0]; ?></option>
- <?php
- }
- }
- else
- {
- print("<option value=\"\">No user</option>");
- }
- mysql_close($link);
- //}
- ?>
- <!--<option>Ball</option>
- <option>Call</option>-->
- </select></td>
- </table>
- </center>
- </body>
- </html>