Search within the html pages
I need help to create a search option on my index page ..
I actually have more than 2000 HTML pages on my site ... each page contains details of different applications
the url of HTML pages are like
http://mydomain.com/application1.htm...34&version=1.1
http://mydomain.com/application1.htm...34&version=1.2
http://mydomain.com/application2.htm...56&version=2.0
http://mydomain.com/application2.htm...56&version=2.1
as the above HTML page urls have application code as well as versions
I want if there is any code or script which when user input the code like above url code=1234 and the user will be redirected to the page containing the code as well as higher version ...
like the code here for search
Code:
<form action="/test.html" method="get">
<input type="text" name="Code" value=""/><br/>
<input type="submit" value="GET IT"/>
</form>
I really appreciate your help
You should put this code in .php page
You should put this page in .php code. Miss Janu. .html does not help you in being dynamic in your website. I have myself developed a website which is down now in .htm page using frames.You can't do anything dynamic.The above given code will not work in html. It can only be used in php page.
Here is another code much easier for you.This has been tried and tested in php page.This will definitely serve your purpose if you put this in .php page
PHP Code:
<form action="test.php?code=<?=$_POST['Code'] ?>" method="get">
<input type="text" name="Code" value="<?=$_REQUEST['Code'] ?>"/><br/>
<input type="text" name="Version" value="<?
if ($_REQUEST ['Code']=="1234") echo "1.1";
else if ($_REQUEST ['Code']=="3234") echo "2.1";
?>"/><br/>
<input type="submit" value="GET IT"/>
</form>
Any other request. you can tell me i'm ready to help you
Regards
developerahusain