I am very confused with this. I have a button which use JavaScript onClick
. It should redirect to another page but it doesn't. It instead downloads the file.
Edit this is all the code
<?php
$getGoogleData="SELECT * FROM markers WHERE propid=$propID";
$QgetGoogleData=$db->query($getGoogleData)or die($db->error);
if($QgetGoogleData->num_rows==1){?>
<p style="color:#27AB00; font-size:16px; font-weight:bold;">There is already Map for this project, you can't edit it but you can reamove it and make a new one<br /><br /><input type="button" onClick="javascript:window.location.href='index.php?cid=9&proid=12&propId=<?php echo $propID?>'" value="Delete Current Map"></p>
<?php }else{?>
<p style="color:#CD0000; font-size:16px; font-weight:bold;">There are no Map for this project please make one<br /><br /><input type="button" onClick="javascript:window.location.href='index.php?cid=9&proid=11&p=<?php echo $propID?>'" value="Make Your Map"></p>
<?php }?>
on the other page proid=11
case 11: header('Location:includes/pan/projects/google/face.php?p='.$p); break;
I found what is wrong but still this will not solve the problem.
I have this file in the same directory .htaccess
which content this code.
AddType application/x-httpd-php .js
AddHandler x-httpd-php5 .js
<FilesMatch "\.(js|php)$">
SetHandler application/x-httpd-php
</FilesMatch>
and I put this file because I have some php code witch will not work with the Js. without this file any help please.