answersLogoWhite

0

You will need a server-side language (and, obviously, a database) to accomplish that. Here's a very simple example, using PHP and MySQL. ---- <?php // Connect to MySQL and select a database (if either one fails, stop the script) $connect = mysql_connect('username', 'password') or exit('Connection failed.'); $select = mysql_select_db('database') or exit('Database Selection failed.'); // Retrieve data from the database. $sql = "SELECT `name` FROM `fruits`"; $query = mysql_query($sql); if (!$query) { exit('The query failed.'); } // Create a drop-down box. echo "<input type='select'>"; // For each row returned, create an option element for it. while ($fruit = mysql_fetch_assoc($query)) { echo "<option>"; echo $fruit['name']; echo "</option>"; } // End the drop-down box. echo "</select>"; ?>

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Information Science

What is drop command?

The DROP table command of SQL lets you drop a table from database . The database requires you to empty a table before you eliminate from the database. But there is a condition for dropping a table ; it must be an empty table.


Which command is used to remove an index from the database in SQL?

It may depend on what flavor of SQL, but whenever you want to get rid of something, DROP is generally your friend. DROP INDEX &lt;indexname&gt;; is likely to be the command needed, with various options depending on, again, exactly what flavor of SQL you're talking about.


What is DDL in databases?

DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).DDL stands for Database Definition Language. It is a language used to create a database. Most databases have a language that will do this. Normally it is a form of SQL (Structured Query Language).


What is one benefit to using a form to view data instead of a table?

A form allows for a more user-friendly and visually appealing way to view and interact with data compared to a table. It can provide a more structured layout, allowing users to focus on relevant fields and reduce clutter. Additionally, forms can be customized to include interactive elements such as drop-down menus or buttons for additional functionality.


What are some of the various definitions of the acronym SDR?

Software-Defined Radio: a radio communication system where components that have typically been implemented in hardware are instead defined by software. Special Drawing Rights: an international reserve asset created by the International Monetary Fund (IMF) to supplement the existing reserve assets. Sales Development Representative: a salesperson responsible for prospecting, qualifying leads, and setting up appointments for the sales team. Strategic Defense Review: a government-commissioned review of a country's defense strategy and capabilities.

Related Questions

What is drop down list in database?

A drop-down list in a database is a user interface element that allows users to select a value from a predefined list of options. It is commonly used in forms to ensure data consistency and accuracy by restricting input to specific entries. When a user clicks on the drop-down, a list appears, displaying the available choices, making data entry easier and more efficient. This helps in minimizing errors and streamlining data collection processes.


What are the components of oracle database?

DDL - Data Definition Language Create,Alter,Drop and Truncate are the components of oracle database.


Can you explain the process of how to drop an index in a database?

To drop an index in a database, you need to use a specific SQL command. First, you identify the name of the index you want to drop. Then, you use the DROP INDEX statement followed by the name of the index. This command removes the index from the database, making the associated data searchable without the index.


What is all about oracle 10g and oracle8i?

The oracle 10g and oracle 8i there is a minor difference that is oracle 8i doesn't support flash back command once we drop the table in database the message is table dropped but we can use flashback command we can retrieve the drop table once in database


How do you Retrieve data from drop down box in one servlet and pass to another servlet?

The data that is present in a web page is available in the Form object of the page which can be accessed from the HTTP Request. If the request object gets passed from one servlet to another the data also would get passed.


Explain the DDL and DML commands in sql with example?

DDL--Data Definition Languageand Commands for DDL as:1.CREATE DATABASE--create a new data base2.ALTER DATABASE---modifies a database3.CREATE TABLE---create a new table4.ALTER TABLE---modifies a table5.DROP TABLE---deletes a table6.CREATE INDEX---creates an index(search key)7.DROP INDEX---deletes an indexDML---Data Manipulation LanguageCommands from the DML part of SQL:1.SELECT----extracts data from a database2.UPDATE--updates data in a database3.DELETE---deletes data from a database4.INSERT INTO---insert new data into a database


Define DDL and DML?

SQL These are the main categories are DDL(Data Definition Language) DML ( Data Manipulation Language) DQL( Data Query Language) DCL( Data control Language) Data administration commands Transactional control command. ddl includes insert ,delete ,update values it include select statements, it include insert statement, it includes drop statements


What is ADO control?

In the context of computers ADO stands for ActiveX Data Objects. An ADO control is an object on your screen such as a text box, button, drop down list etc., that can be tied or, to use the standard term, bound to a database, or used in some way to manipulate a database. So your dropdown list could show a list of items from a database, from which you can choose one. You could use a text box to enter data, which is then put into a database. These can be programmed on a form to create database applications for use on Windowns, using languages like Visual BASIC.


What is functions of a database management system?

a set of principles concerned with determining which states are valid for a database.Data Integrity within a relational database is that property of a database which ensures that it is and remains an accurate reflection the universe of discourse that it is attempting to model. This includes rules and restrictions to ensure the recording of correct data. It also involves the protection of data within the database. These rules are called integrity constrains.These restrictions are used in almost every field of input to the database.Examples of this is where you are given a drop box on a form to select from a list. This eliminates the chance of multiple spelling of a word. eg. colour color


Can you explain the potential risks and precautions associated with using the SQL command "DROP TABLE students" in a database management system?

Using the SQL command &quot;DROP TABLE students&quot; in a database management system can permanently delete the table and all its data, leading to loss of important information. To prevent accidental deletion, it is important to double-check the command before executing it and to regularly back up the database to avoid data loss.


How would you fetch cities of a country from database in php?

It is only possible through use of ajax. Use a drop-down menu for countries and add a onchange even handler which will fetch data. See the related links (provided below for examples)


What is data definition language?

There are four types of commands in Structured query language. One of the four type of command includes data definition language. Data definition language includes create , delete , drop command .