PHP Simple Search Form

0 votes

Since I'm new to PHP, I'd like to start with a simple query system that prints out the full name, date of birth, gender, and identity number when I only search by identification number.

The page's search.php file is the first one on the list. The document's interior comprises

<html>
<body>

<form action="result.php" method="get">
  ID Number: <input type="text" name="idnumber"> <input type="submit" value="Search"><br>
</form>

<p>Input ID number</p>

</body>
</html>

Then I made a database called users with the following columns: id, full name, date of birth, gender, and identification number.

What code should I add to result.php so that when a match is made between the identification number and the search term, all of the person's information is printed?

a case study of the scenario John Doe, a Male, age 20, and the database ID 900920A44. If you search with the keyword "900920A44," the information for the matching user will come out, but if you search with the term "900920A," nothing will print out because another person may have used the identification number "900920A55."

Aug 8, 2022 in PHP by Kithuzzz
• 38,010 points
374 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
0 answers

Creating a search form in PHP [duplicate]

I am working on a function where ...READ MORE

Jun 9, 2022 in PHP by Kichu
• 19,050 points
229 views
0 votes
0 answers

PHP Simple Form Validation

I want a form validation like the following. Name: ...READ MORE

Jun 26, 2022 in PHP by narikkadan
• 63,420 points
762 views
0 votes
1 answer

What are the vulnerability related to PHP Form?

Hii, The $_SERVER["PHP_SELF"] variable can be used by ...READ MORE

answered Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,733 views
0 votes
1 answer

How can we avoid my php form from hacking?

Hii @kartik, If you want to know php ...READ MORE

answered Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,305 views
0 votes
1 answer

How to Validate Form Data With PHP?

Hey @kartik, The first thing we will do ...READ MORE

answered Feb 13, 2020 in PHP by Niroj
• 82,880 points
2,919 views
0 votes
1 answer

How to validate E-mail and URL of Php form?

hey, The code below shows a simple way ...READ MORE

answered Feb 13, 2020 in PHP by manish
2,019 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
9,626 views
0 votes
1 answer
0 votes
1 answer

How to access PHP var from external javascript file?

Hello @kartik, You don't really access it, you ...READ MORE

answered Jul 6, 2020 in Java-Script by Niroj
• 82,880 points
7,165 views
0 votes
1 answer

How do I escape a single quote in SQL Server?

Hello @kartik, Single quotes are escaped by doubling ...READ MORE

answered Jul 21, 2020 in PHP by Niroj
• 82,880 points
5,881 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP