Help pleaseeeee :)
|
2011-10-19, 15:55
Post: #1
|
|||||||
|
|||||||
Help pleaseeeee :)
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 |
|||||||
2011-10-19, 18:51
Post: #2
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
http://www.w3schools.com/html/html_forms.asp
There's also a couple of dropdown box examples at the bottom |
|||||||
|
|||||||
2011-10-19, 18:55
(This post was last modified: 2011-10-19 18:55 by Ash.)
Post: #3
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
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 |
|||||||
2011-10-19, 19:06
Post: #4
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
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 |
|||||||
|
|||||||
2011-10-19, 19:08
(This post was last modified: 2011-10-19 19:10 by Ash.)
Post: #5
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
Ok awesome mate thanks!
Edit: Could you not change the option URL's or something? |
|||||||
2011-10-19, 19:21
Post: #6
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
Something like this *might* work: (untested)
dostuff.php: PHP Code: <?php |
|||||||
|
|||||||
2011-10-19, 19:24
(This post was last modified: 2011-10-19 19:47 by Ash.)
Post: #7
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
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? |
|||||||
2011-10-20, 19:53
Post: #8
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
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 |
|||||||
|
|||||||
2011-10-20, 20:03
Post: #9
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
Works VERY well
|
|||||||
2011-10-21, 08:48
Post: #10
|
|||||||
|
|||||||
RE: Help pleaseeeee :)
I understand nothin
|
|||||||
|
|||||||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group