PHP javascript link id
Posted
by Jordan Pagaduan
on Stack Overflow
See other posts from Stack Overflow
or by Jordan Pagaduan
Published on 2010-05-31T03:09:45Z
Indexed on
2010/05/31
3:22 UTC
Read the original article
Hit count: 324
php
|JavaScript
<?php
//connect to database ....
//select query ....
if(isset($_GET["link"])==false){
echo "sample 1";
}else{
echo "sample 2" ;
}
?>
<script type="javascript">
function Link(id)
{
location.href='linktest.php&link='+id;
}
</script>
<html>
<input type="button" value="link test" onclick="javascript: Link<?php $row['id']; ?>">
</html>
(assumed question) How do I force the onclick event to contain the value of $row['id']?
© Stack Overflow or respective owner