syco Posted May 14, 2008 Share Posted May 14, 2008 How to make a search box search my site.how to do index.php?whatever=whatever Link to comment Share on other sites More sharing options...
Synook Posted May 14, 2008 Share Posted May 14, 2008 How to make a search box search my site.Depends on how you store your pages.how to do index.php?whatever=whatever <form action="index.php" method="get"><input type="text" name="whatever" value="whatever" /><input type="submit" value="Clicking this button will send you to index.php, with the querystring stating that whatever will equal the value in the above input box" /></form> or just link to that URL directly. Link to comment Share on other sites More sharing options...
syco Posted May 14, 2008 Author Share Posted May 14, 2008 I dont know how to set the url up like that..my pages are stored in a server Link to comment Share on other sites More sharing options...
Ingolme Posted May 14, 2008 Share Posted May 14, 2008 You can make the URL however you want. Just put it in a link, for example:<a href="mypage.php?variable=value">Open MyPage with Variable</a>But I think what you're trying to ask is how to use it.You can access the variable with PHP usin $_GET['variable']. After that you just use your imagination to make an application that will use the variable for whatever you need it. Link to comment Share on other sites More sharing options...
Synook Posted May 14, 2008 Share Posted May 14, 2008 How to make a search box search my site. my pages are stored in a serverIf your pages are static HTML, then you will have to index them yourself. Write a server-side application that runs through all your pages and stores cached versions of them (simplified IYL) in a database. Then you can search the database. Link to comment Share on other sites More sharing options...
syco Posted May 14, 2008 Author Share Posted May 14, 2008 I don't know how to do that. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 14, 2008 Share Posted May 14, 2008 If you did, you probably wouldn't be posting here asking how to do it. The first step is to learn PHP, so go through the PHP tutorials on the site, do a Google search for PHP tutorials, read the sticky topics in this forum, and read through the first several sections of the manual at php.net. If you want to get a book, Programming PHP from O'Reilly is a good book. Then you'll need to set up your computer to run PHP scripts so you have a place to practice. Then you can start figuring out how to use a database to store what's on your site to make it easy to search through.You can also use Google to search only your site. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.