skip to Main Content
<a  class="btn-danger" href="<? php echo SITEURL;?>admin/delete-admin.php?id=<?php echo $id;?>"> Delete </a>  

I write the link of a button like this but I found this error

Forbidden
You don’t have permission to access this resource.

Apache/2.4.48 (Win64) OpenSSL/1.1.1l PHP/7.3.30 Server at localhost Port 80

2

Answers


  1. Forbidden You don’t have permission to access this resource.

    It looks like an Apache error, you have to check your vhost.

    And for the PHP, you have to write

    <a class="btn-danger" href="<?php echo SITEURL; ?>admin/delete-admin.php?id=<?php echo $id; ?>"> Delete </a>  
    

    Or, shorter way

    <a class="btn-danger" href="<?= SITEURL; ?>admin/delete-admin.php?id=<?= $id; ?>"> Delete </a>  
    
    Login or Signup to reply.
  2. why don’t you use template engines or frameworks like Laravel?

    and also try this:

    <a  class="btn-danger" href="/admin/delete-admin.php?id=<?php echo $id;?>"> Delete </a> 
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search