Hi, I want to pass my variable value when someone click on hyperlink. However i don't want to pass along with '?' i.e. <a href="http://site1.com?val=$num">link1</a> Is there any other way ? As i have more than 50 links as below : <a href="http://site1.com>Site1</a> - pass value 1 to site1.com <a href="http://site2.com>Site2</a> - pass value 2 to site2.com <a href="http://site3.com>Site3</a> - pass value 3 to site3.com <a href="http://site4.com>Site4</a> - pass value 4 to site4.com <a href="http://site5.com>Site5</a> - pass value 5 to site5.com and so on... Is it possible to pass through post method something like using form... ??
Yup using mod rewrite , it is possible but have to construct regular expression for that. But u can't pass it using post, only get is possible .
you can use like this <a href="http://site1.com?val=$num" onclick='document.postform.val.value="<?php echo($val);?>";document.postform.submit();return false;'>link1</a> <form method='post' name='postform'> <input type='hidden' name='val' /> </form>