Home | Advertising Info224 USERS CURRENTLY ONLINE   
   Site Search Contact Us Monday, November 11, 2019  

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"

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

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

Topping 1
Extra Cheese

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2019 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