index.php
$typesql = $_GET['type']
fetch_pages.php
$results = $mysqli->prepare("SELECT name, type FROM artists WHERE type = ?);
$results->bind_param("s", $typesql);
$results->execute();
$results->bind_result($name, $type);
I use the above to get the artist type in index.php, I want to pass it to use it in fetch.php and bind it to my sql query.
You can put the $_GET value to a session and you can use that session variable to access the data on another page
example
page 1
session_start();
$_SESSION['type']=$_GET['type'];
page 2
session_start();
$type = $_SESSION['type'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With