How to add id to path in php

I am trying to transfer id index page to another page as below

 $id=48;

 header("Location: ".$redirect."parties.php&id=$id");

but its not working please help me

+3
source share
2 answers

Change &to?

header("Location: ".$redirect."parties.php?id=$id");

Then in parties.phpyou can access it using$_GET['id']

+13
source
header("Location: ".$redirect."parties.php?id=$id");
+4
source

All Articles