8 Replies Latest reply: Oct 15, 2014 2:55 PM by Rob Hecker2 RSS

    PHP redirect

    Max Resnikoff Community Member

      Hi,

       

      I have a form which has its action to redirect to: update.php, where the action takes place.

       

      But when the user click on the delete button, it goes to update.php and stays on the blank page.

       

      How do I redirect it so that once the code in update.php is done, it will automatically redirect to index.php?

       

      Here is the code in update.php:

       

      <?php require_once('../../Connections/djdirect.php'); ?>

       

      <?php

      $id = $_GET['id'];

      $sql = "UPDATE clients SET cancel=1 WHERE id = $id";   

      mysql_query($sql);

      ?>