Reputation: 691
I have here my href link being echoed:
echo "<td><a href='../php/borrowersname.php?acc_number=".$row['acc_number']."'>".$row['title']."</a></td>";
And I have here a sample on how to create a Pop-Up:
<a href="javascript:window.open('some.html', 'yourWindowName', 'width=200,height=150');">Test</a>
How to combine this to my href link
above being echoed with the "javascript ... ..."
enclosed by ("" && '')
?
Thanks for another new learning.
Upvotes: 1
Views: 87
Reputation:
You can escape the ""
<?php
echo "<a href=\"javascript:window.open('../php/borrowersname.php?acc_number=".$row['acc_number']."', 'yourWindowName', 'width=200,height=150');\">Test</a>";
?>
In the 'borrowersname.php' page, you can get the value of 'acc_number' like this:
<?php
$value = $_GET['acc_number'];
//do something with $value;
?>
Upvotes: 1