Hi everyone, I have a script running on my page that uploads a new image.
I am getting the information from the mysql ok, by using

if (isset($_POST['var'])) {

Once the vailidation is complete, at the moment I am using

header("Location: url.php");

to reload the page to display the new photo uploaded.
How do I include the above post var in the header Location url.php
Is it possible with open and close php tags

Set your $_POST['var'] as a variable:

$var = $_POST['var'];

Then you can pass the variable through your url using:

header("Location: url.php?var=$var");

In url.php you can use the variable however you need by doing the following:

$passed_var = $_GET['var'];
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.