Code Below is my Javascript function
<code><script>
function ban_ip(test) {
alert(test);
}
</script>
</code>
<code><script>
function ban_ip(test) {
alert(test);
}
</script>
</code>
<script>
function ban_ip(test) {
alert(test);
}
</script>
I am using an onclick method for a button to send data to this function
<code><button value='IP Ban' class='myButton' onclick=ban_ip(".$ipban.") >Ban IP</button>
</code>
<code><button value='IP Ban' class='myButton' onclick=ban_ip(".$ipban.") >Ban IP</button>
</code>
<button value='IP Ban' class='myButton' onclick=ban_ip(".$ipban.") >Ban IP</button>
The php value is coming from a Mysql database and I am getting that with
<code>$ipban = $row['Ip'];
</code>
<code>$ipban = $row['Ip'];
</code>
$ipban = $row['Ip'];
The data displays fine in my html table of the IPS, but Im terrible with Java, seems the function won’t work sending an IP to it, I am sure it is something very simple, I’ve looked at so many examples googled, but just can’t seem to find an answer on how you pass a php mysql variable to JavaScript function