×

Please Login or Register to continue.

3
(1.6K Views)

Hello, how are you, hope you are doing well. I have a database in MS Access (.mdb) format, I want to show my database records on the HTML page on the search button. For example: If I search the name of the person it should show all record of the search field * Hope you understand my question.
(170 Points)
in PHP

Share

3 Answers
(9.4K Points)
3

If you have data in the  MS Access (.mdb) format. You should import this data into the MYSQL database formate. You can import the complete database into the MYSQL database.

 Upload a CSV(excel) file and import into the database using PHP and MYSQL

You will able to insert your MS Access (.mdb) format into the MYSQL database. 

Now, create an HTML form with one textbox and one button. 

You should understand the MYSQL query. 

Use the input box value as a variable value. 

Select name, mobile, email from table_name where name=$name ; 

Use the query like this and display the value related to the searched name. 

$name = Input box value . 

 

 

 


Comment

(7.3K Points)
(edited)
2

If you want to display the data on the HTML page using the search button then you should import your MS access data into the MYSQL database. PHP supports importing the MS access data into the MYSQL database. If you want to search a name and want to display the data related to the name, you should understand the Where clause. like - 

Select name, email from table_name where name='Jack'; 

The value will be inserted into the input box and will be stored in a variable. You can use the variable in another query to display the related data.

Search data and display it on the HTML page. 

<?php
$databaseHost = '127.0.0.1';//or localhost
$databaseName = 'dbname'; // your db_name
$databaseUsername = 'root'; // root by default for localhost 
$databasePassword = '';  // by defualt empty for localhost
$mysqli = mysqli_connect($databaseHost, $databaseUsername, $databasePassword, $databaseName);
?>
<form action="" method="post">
Enter Name <input type="text" name="name">

<input type="submit" name="submit">

</form>
<?php 
if(isset($_POST['submit']))
{
$name = $_POST['name'];
$stmt = mysqli_query($mysqli,"SELECT email,mobile FROM table_name WHERE name = $name");
while($res = mysqli_fetch_array($stmt))

{ 
echo $res['emali']; 

echo $res['mobile']; 
}

        }

?>

 

The code above will help you understand the searching concept. It's really easy.

You can use another searching reference - 

Display data from MYSQL database table using PHP and AJAX |Search  

 


Comment

(4.3K Points)
(edited)
0

The search system is like another feature of the website, which increases the value of the website. The search system can be easily created by PHP programming and MySQL database. For this, the PHP function has to be created. Pagination is also required along with the search input box. If a user goes to the website and gets related data from the searched word, then all those data are displayed with the help of the pagination. The search system can be easily created by PHP and MYSQL. Pagination is also required to display data through search.

One day I was also searching on Google about the search system IN PHP. That's when I got the best solution. Which I used on my website along with the search box as well as pagination. This is one of the best solutions for search and pagination in PHP.

Pagination and search box in the blog using PHP and MYSQL


Comment

Related Questions :-

Featured Items:-


Certificate system in PHP website | PHP scripts

$22



Home Credito loan finance management multipurpose system in PHP

$65



Result management system with Marksheet in PHP website | PHP Scripts

$39




Your Answer

You can post your answer after login..