I want to use target_blank in header location..but after going through some posts,its clear that we can't use target_blank in header
location..now someone please tell me how to do this using window.location()..please help me ASAP!!!
target_blank in header location!
I think you want window.open.
Thank You Sir! now I want to store the window.open('url.php') in a php variable..I have tried something like this::
<?php
if(isset($_REQUEST["button3"]))
{
$qry="UPDATE asc_payment SET comm_rcpt='$scrcpt' WHERE trans_id=$tid";
$qryupdt=mysql_query($qry);
if($qryupdt>0)
{
$x=?>'<script language="javascript">window.open('adm_empdtls.php'); /error is in this line/
</script>'
<?php ;
echo $x;
}
}
?>
But its not working..Error is "Parse error: syntax error, unexpected ';' in....." I am new in php and javascript..so need your advice in this case also..Please help!
First, please make use of the code formatting features of this site so the code that you paste is readable rather than just a jumble of code.
Second, you are obviously having a problem with your PHP syntax. You might want to start by reading about strings in order to understand how they can be specified. You also need to keep in mind that all of your PHP code must lie between the opening <?php tag and the closing ?> tag. For some reason, you end your script with $x=?>
Syntax is an extremely basic thing you must know. If you're having trouble with that, everything else is going to be impossible.
Okay Sir!