Helping ordinary people create extraordinary websites!
   

I want to pass the php variable to popup window

Sunday, 27th June 2010
by ali786

<body>
<form method="post" action="js.php">
Email: <input name="email" type="text" value=""/><br />
Message:<br />
<textarea name="message" rows="15" cols="40" value=""></textarea><br />
<input type="submit" <? $var= $_POST['email']; ?>onClick="OpenPopup()"/>

<?

$var1=$var;
?>
</form>
<script type="text/javascript" language="javascript">
function OpenPopup ()
{
var test="<?php echo $var1; ?>";
openwindow=window.open("js.php?email="+ test,'Window1',"menubar=yes,width=430,height=360,toolbar=no");
// openwindow.document.write(test);
alert(test);
}
</script>

</body>





More PHP Help:
» Best ways to learn to develop online software using PHP and MySQL?
» How to remove all characters except letters from a string?
» Convert a string into an array
» What is the use of extract($_REQUEST);
» PHP Includes, how to add page data to other pages using PHP include?
» How to limit the number of words in my display with PHP?
» Sorting an array in ascending order
» Financial Tools, Profit /loss etc

SPREAD THE WORD!
Tell a Friend

GET OUR NEWS

Developer Resources