I'm trying to convert a string to be included it in a link href tag. This is what i have now:
<?php
$title = urlencode(the_title());
?>
<form>
<input type="button" value="Submit Resume" onClick="window.location.href='..../../submit-resume/?job=<?php $title ?>'">
</form>
I can get 'the_title()' to post to URL, but the problem is that the title might have characters such as "R&M Technician" where "&" is cut off from the string once it parse through URL and i can't get the complete value.
output should be R%26M%20Techncian. Currently I'm just getting R&M%20Technician, without %26.
Any help would be much appreciated.
Thanks