Jump to content

redirect links like facebook etc?


xcoderx

Recommended Posts

<?php
  if (isset($_GET['u'])) {
      echo 'Do you really want to continue?<br/>
      <form method="post" action=""><input type="submit" name="yes" value="Yes"><input type="submit" name="no" value="No"></form>';
  }
  
  if (isset($_POST['yes'])) {
      //Redirect Code
  }
  
  if (isset($_POST['no'])) {
      //Go back to old location
  }
?>

 

Something like that would be suffice.

I haven't tested it but it should be something like this with the redirect put in:

 

 

<?php
  if (isset($_GET['u'])) {
      echo 'Do you really want to continue?<br/>
      <form method="post" action=""><input type="submit" name="yes" value="Yes"><input type="submit" name="no" value="No"></form>';
  }
  
  if (isset($_POST['yes'])) {
      //Redirect Code
      header("Location: " .$_GET['u']);
  }
  
  if (isset($_POST['no'])) {
      //Go back to old location or whatever else you want.
  }
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.