answersLogoWhite

0


Best Answer

I'm just going to assume that "left" and "right" are names of an input fields, and that the form type is "POST"

in the php file that your form is posted to, you can get these values like this:

$left = $_POST["left"];

$right = $_POST["right"];

now $left and $right will have the values from your form, and you can use them as you like.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you retrieve data with while query which take left and right value from HTML form from MySQL using PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you retrieve an image from a database using PHP?

It depends what Database you are using. I personally use MySQL so will explain how you would do it using MySQL. You would have to create the MySQL database. I would store the image URL rather than the actual image. Then call it using PHP and a MySQL query. For Example: $sql = "SELECT * FROM Images WHERE Img_Name = 'img1'"; $query = mysql_query($sql); $array = mysql_fetch_array(query); then you would call it into HTML like so:


How do you retrieve the data from database?

To retrieve data rfrom a mysql database you first need to connect to the database using the mysql connection string(mysql_connect) after that, it's just a matter of executing a query of "SELECT `field1`, `field2` FROM `tablename`" Obviously replacing field 1 and 2 with the fields you want to replace and tablename with the table the data is stored


How do you create a database using PHP?

The following are the fundamental procedures for creating a MySQL database with PHP: As demonstrated in this article, connect to the MySQL server from your PHP script. If the connection is successful, construct a database using SQL and save it in a string variable. Carry out the query. To learn more about data science please visit- Learnbay.co


How many factories within one kilometre of all schools by using a query.?

mysql> SELECT COUNT(*) FROM factories WHERE school_distance < 1000; +---------------+----+ | COUNT(*) | 0 | +---------------+----+ mysql> SELECT COUNT(*) FROM `questions` WHERE `wording` LIKE '%terrible%'; +---------------+----------------------------+ | COUNT(*) | 9812438708923 | +---------------+----------------------------+ mysql>


How do you retrieve data from one MySQL table and create another MySQL table with the same data in it using PHP?

Execute a SELECT INTO statement on the mysql database: INSERT INTO destination_table (id, first_name, last_name) SELECT id, first_name, last_name from source_table;


What is an insert query in PHP and MySQL?

In a database table, the INSERT INTO statement is used to insert new rows. Let's create a SQL query with acceptable values using the INSERT INTO statement, and then run it by passing it to the PHP mysqli query() function to insert data into the table. To learn more about data science please visit- Learnbay.co


How do you print using the Rollmaster software?

First you have to retrieve the data from the database by using the 'records view', 'Query' or 'report' menus. Then select print.


When you request specific data from a database what is it called?

When you request specific data from a database, it is called a query. A query is a request for information from a database that matches certain criteria. This is commonly done using Structured Query Language (SQL) commands to retrieve the desired data.


What is database searching?

Database searching is the process of querying a database to retrieve specific information. It involves formulating a search query using keywords or filters, and then executing the query to retrieve relevant data. This is commonly used in various fields, such as research, business, and information retrieval.


What is the purpose of a query in a database?

The purpose of a query in a database is to retrieve specific information that meets certain criteria. Queries allow users to search, filter, and extract data from databases based on their requirements, enabling them to retrieve only the relevant information they need.


Selecting data by means of a query?

To select data using a query, you need to use a SELECT statement in SQL. Specify the columns you want to retrieve data from and the table where the data is located. You can also apply conditions using WHERE clause to filter the data before retrieving it.


How can you retrieve data from database in drop down box?

You can retrieve data from a database and populate a drop-down box by querying the database for the desired data, looping through the results, and creating options for the drop-down box based on the data retrieved. Once you have the data, you can populate the drop-down box with the options using HTML or a front-end framework like React.