Can you point out what is wrong with this code: if($email=="") { $link=="site1.com" ; } else { $link="site2.com"; } $email value is taken from $_POST and passed onto <a href="<php $link>/click.php> I get site2.com when $email is not null but I don't get site1.com when $email is null. Please help
Both the solutions worked for me. thanks, rep added Although, you too wrote the code wrong but I got it what you are saying.