How can i write a javascript alert inside php ? For example if i want to popup a javascript alert in this if condition how I can do it ?
if(isset($_POST['downloadkey'])){
$key = $_POST['downloadkey'];
if($key != $data['download_key']){
echo 'Your key is wrong.';
echo '<script type="text/javascript"> alert(Your downlaod key is wrong, Please try again!);</script>';
}
}
Thanks in advance
alert()needs to be wrapped in quotes.)