0

Hi,
Currently I am building a html page that has some fields to search items into database.
For the moment I am using 2 files index.html and search.php, in the page index.html I can input the word that I want
to search in the database and I send the inputs to the search.php file that it gives me the results in a table...
But here its the problem! This is a ugly way to do this.

Could anyone help me with an example how to make a seach page(.html) that interacts with a .php file, but it shows
the results on its page.

2
Contributors
7
Replies
8
Views
5 Years
Discussion Span
Last Post by JorgeM
0

You would like to show the results on the same HTML page? Without any server side scripting on that HTML page, you can use JavaScript/Ajax to get results back from the web server.

0

PHP is not my strength. I have more expereince with asp.net. We'll need someone else to assist you with PHP guidance.

0

Thx man, however in my opinion this is a child stuff, but I am a begginer in web programming so I don't understand very well this things...

0

you are correct in your assumption. What you are asking is very basic.

The concept as I understand what you are asking is that you want to provide search capability from index.html and provide the results on the same page.

You can do this via Ajax.

Here is an example pretty close to your scenarion but is shown with a asp page. Instead of asp, your back-end page is the search.php page.

http://w3schools.com/ajax/ajax_database.asp

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.