I want to send to my onClick function, the value of the mysql data that echo on function.
I have this function
<script>
function showDetails(ask) {
<?php
mysql_query("DELETE FROM `registration` WHERE `registration`.`uid` = ask") or die("query not working");?>
return true;
}
</script>
//php code to send the value to showDetails() function
<?php
while ($user_field = mysql_fetch_assoc($userdata)) {
$sak=$user_field['uid'];
?>
<a href="edit.php?myid=<?php print $user_field['uid']; ?>">Edit</a>
<a href="#" onClick="showDetails('<?php echo $sak; ?>');">Delete</a>
<?php
}
?>
Not Passing value :(