actuly i need if my site page run in a iframe then display a code if not in iframe the display another code. i need to do it with php. did you think its possible ?
i need the js condition in my php. how way write it ? its for iframe. go top or iframe Break any one help me js is
if (top != self){
document.writeln("Hi");
}
else
{
document.writeln("Bye");
}
how to write it in Php
or these way
<?php
if ( $i == 1) {?>
<script type="text/javascript">
if (top != self){
document.writeln(" <?php $i = 1; ?> ");
}
else
{
document.writeln(" <?php $i = 2; ?> ");
}
</script>
<?php
if ($i == 1)
{
echo "hi";
}
else
{
echo "bye";
}
}
else {
echo "else hi";
}
?>
if its possible like these way help me pleas