PF2G 0 Junior Poster in Training

Hi,

I'm using a javascript messagebox, but i'm having trouble with the delete:

<html>
        <head>
            <title>Adminstração</title>
            <!---------------------------------------------->
            <script type="text/JavaScript">
                function confirmDelete()
                {
                    var agree=confirm("Tem a certeza que quer remover?");

                    if (agree)
                    {
                         return true;
                         <?PHP
                            $del="DELETE FROM content_lang WHERE id_content = '".$row_lang['id_content']."'";
                            $q_del=mysql_query ($del, $connect);
                        ?>
                    }
                    else
                    {
                         return false;
                    }
                }
            </script>
            <!---------------------------------------------->
        </head>


        (....)

        <td width="5%">
                        <a href="" onClick="confirmDelete();">Remover</a>
                    </td>
                </tr>
            </table>

I feel stupid to not know where the error is :/

Can someone help me, please?

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.