I'm having some trouble getting my HTML
and php
to work together.
I've made a onClick
that should run a PHP function
i have in the top of the PHP
file. But every time i click it, it says: ReferenceError: deleteSub is not defined
. Can someone tell me what I've done wrong?
HTML:
<?php
if(mysql_num_rows($sql_select_delete) > 0){
while($row = mysql_fetch_assoc($sql_select_delete)){
?><div class="abo_box">
<label class="abo_navn" id="<? echo $row["id"]; ?>"><? echo $row['abo_name']; ?></label>
<label class="delete" onclick="deleteSub();">Delete</label>
</div>
<?php
}
}
?>
PHP:
function deleteSub(){
echo "deleted";
}