get - how to pass string with character '&' in url in php -
i developing program in php. want pass whole string '&' character using $_get. i'm facing problem cuts string character '&' have use code below
$customer="mahindra & mahindra pvt.ltd." <a href="main.php?cust=". $customer."">procceed</a> and in second page use code: new veriable declared , passes url veriable in , print variable.
$c=$_get['customer']; echo $c; its output "hahindra", want whole string.
<?php $customer="mahindra & mahindra pvt.ltd."; echo '<a href="main.php?cust="'.urlencode($customer).'">procceed</a>'; ?>
Comments
Post a Comment