Help pleaseeeee :) - Printable Version +- [TC] Gaming Forums (https://forum.city-driving.co.uk) +-- Forum: Community Area (/forumdisplay.php?fid=14) +--- Forum: Off-Topic Chat (/forumdisplay.php?fid=15) +--- Thread: Help pleaseeeee :) (/showthread.php?tid=298) |
Help pleaseeeee :) - Ash - 2011-10-19 15:55 Im currently trying to create a html/php page for my own personal homepage. I want (And have done before, just cant remember how lol), a text box, and a drop down menu. I want the drop down menu to choose where exactly to search, if that makes sense. So i can have like Google/Yahoo/Bing etc, so i type a text phrase, select where i want it to search, then hit submit. Any help would be gratefully appreciated! Thanks Ash RE: Help pleaseeeee :) - Elmo - 2011-10-19 18:51 http://www.w3schools.com/html/html_forms.asp There's also a couple of dropdown box examples at the bottom RE: Help pleaseeeee :) - Ash - 2011-10-19 18:55 Yehh ive seen that page elmoish, thanks anyway What i need is a text box though, then a drop down menu, with each of those values to have a html code into it. For example like our URS, have the URL of it, add "file.php?username=" then add the value from the text box into the end of it? For example if i wrote my name, it would show file.php?username=racerash3. Is it possible? Thanks Ash RE: Help pleaseeeee :) - Elmo - 2011-10-19 19:06 Code: <form name="input" action="html_form_action.asp" method="get"> html_form_action.asp?user="some text" if you have more than one control within the form tags, it'll send a value for each control. So, with this code: Code: <form name="input" action="dostuff.php" method="get"> I enter "City Driving" in the text box and select Google on the dropdown, pressing the Go button will do: dostuff.php?search_text=City%20Driving&search_engine=google dostuff.php would need to be able to do something with the values it gets. I'll have a quick look how RE: Help pleaseeeee :) - Ash - 2011-10-19 19:08 Ok awesome mate thanks! Edit: Could you not change the option URL's or something? RE: Help pleaseeeee :) - Elmo - 2011-10-19 19:21 Something like this *might* work: (untested) dostuff.php: PHP Code: <?php RE: Help pleaseeeee :) - Ash - 2011-10-19 19:24 Na doesnt work im afraid I did come up with something purely upon HTML at one point but i cannot remember to save my life Thanks for trying tthough mate! Would it be possible to get the form's action to be a php variable? RE: Help pleaseeeee :) - Elmo - 2011-10-20 19:53 If anyone else is interested, this works: some html page PHP Code: <form name="input" action="dostuff.php" method="get"> dostuff.php PHP Code: <?php RE: Help pleaseeeee :) - Ash - 2011-10-20 20:03 Works VERY well RE: Help pleaseeeee :) - Crille - 2011-10-21 08:48 I understand nothin |