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

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -