Here's how to pass your PHP variable to a JavaScript button Click function
and here's how to pass it to onClick function
The variable is $username
and here's how to pass it to onClick function
echo "<td><input type=\"button\" value=\"Edit\" onClick=\"editItem('".$username."')\"> <a href=\"delete.php\" onClick=\"return confirm('Are you sure you want to delete?')\">Delete</a></td>";
No comments:
Post a Comment