Search code examples
phphtmlhref

Why can't I pass variables via URL in PHP?


Given this URL:

 <a href="abs.php?id=<?php echo $f1 ;?>" >Edit</a>

Why can't I pass the variable $f1 to next PHP file?


Solution

  • On the next page you would need to:

    $f1 = $_GET['id'];