Hi, I have to list menus with date in both, what i want to do is when the user select data from them both and hits search i want it to come back with a url like this: www.website.com/post[list1]/post[list2]/ How would i do this? Cheers, Adam
hI you will need to write javascript which will change values of hidden fields(whatever maximum number of options in menu) just using javascript pass the data to hidden fields then the form will take the user to url like this www.website.com/abc.php?p1=aaaaa&p2=bbbbb then using mod rewrite you can convert this to desired url which will be translated to above url Regards Alex
I get what you mean, How would i go about this though as i have never used javascript in this way before. I assume it would be something like this: <select name="service" id="service" onchange="changethis(name)> <option value="Test" selected="Test">Test</option> <select name="service2" id="service2" onchange="changethis(name)> <option value="Test" selected="Test">Test</option> <a href="http://www.website.com/updatevaluehere/updatesecondvaluehere/"><img src="image.jpg"></a> Code (markup): Cheers, Adam
What you could do is use some sort of intermediate page, like this: <form action="search.php" method="post"> <input name="service" type="text" /> <input name="service2" type="text" /> <input type="submit" /> </form> PHP: search.php: <?php header('Location: /search/' . urlencode($_POST['service']) . '/' . urlencode($_POST['service2']) . '/'); ?> PHP: Haven't tested that either and it'll probably end up more complicated than that but it's an idea. Then you'll just need mod_rewrite to access the page above RewriteEngine On RewriteRule ^/search/([a-z0-9]+)/([a-z0-9]+)/?$ searchresults.php?service1=$1&service2=$2 PHP: ^^ Take that with a grain of salt