convert to php code from javascript
Posted: Sat Aug 29, 2009 12:13 am
this is a link using codeigniter framework ....and goToTmbd() is a function inside miscellaneous controller:
<a href="<?=base_url()?>miscellaneous/goToTmbd.html">Travelmartbd.com</a>
//this is the function
<?php
class Miscellaneous extends Controller {
function goToTmbd()
{
echo “<script>
var uri = ‘http://www.travelmartbd.com’;
window.location.href=uri;
</script>”;
}
}
?>
//i want to write this function without javascript.i want to do it through pure php
<a href="<?=base_url()?>miscellaneous/goToTmbd.html">Travelmartbd.com</a>
//this is the function
<?php
class Miscellaneous extends Controller {
function goToTmbd()
{
echo “<script>
var uri = ‘http://www.travelmartbd.com’;
window.location.href=uri;
</script>”;
}
}
?>
//i want to write this function without javascript.i want to do it through pure php