Home | Advertising Info188 USERS CURRENTLY ONLINE   
   Site Search Contact Us Friday, March 24, 2017  
 
 







DISCUSSION ARCHIVES
DISCUSSION ARCHIVES 2
DISCUSSION ARCHIVES 3
BLOG

 
Try a free httpZip trial now and compress for less!


We didn't realize
the site was so popular.

Other Stuff
 
 


Forms - Populating radio buttons with info from a database



Below is an example of populating radio buttons from a field in your database.

This is just an example.. when doing this for real you would do a query to determine the existing values for all the form fields... for this example we will populate the variable ourselves with one of 3 possible values..  "Extra Cheese" , "Pepperoni" , or "Sausage".

<%
Topping1 = "Pepperoni"
%>

<form>
<div align="center"><center><table border="0">
<tr>
<td colspan="2" align="center">Topping 1</td>
</tr>
<tr>
<td><input type="radio" value="Extra Cheese" name="Topping1"
<% If Topping1 = "Extra Cheese" Then Response.Write(" checked") %>></td>
<td>Extra Cheese</td>
</tr>
<tr>
<td><input type="radio" value="Pepperoni" name="Topping1"
<% If Topping1 = "Pepperoni" Then Response.Write(" checked") %>></td>
<td>Pepperoni</td>
</tr>
<tr>
<td><input type="radio" value="Sausage" name="Topping1"
<% If Topping1 = "Sausage" Then Response.Write(" checked") %>></td>
<td>Sausage</td>
</tr>
</table>
</center></div>
</form>

And this is what the output would look like if the field had the value "Pepperoni".

Topping 1
Extra Cheese
Pepperoni
Sausage

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2017 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com