But I want to add into here an if and an else statement so that if $_GET{"image_id_1] is not null or set from the url this line does not show "$image1 = "image_id_1=" . $_GET["image_id_1"] . "&";"
I've tried this:
Code: Select all
$image1 = if ($_GET["image_id_1"]!="") echo "image_id_1=" . $_GET["image_id_1"] . "&" };
Here is the full code
Code: Select all
<?php
$returnurl = $_GET["url"] . ".php?";
$image1 = "image_id_1=" . $_GET["image_id_1"] . "&";
$image2 = "image_id_2=" . $_GET["image_id_2"] . "&";
$image3 = "image_id_3=" . $_GET["image_id_3"] . "&";
$position = $_GET['image_position'];
$newimage = "image_id" . $position ."=" .stripslashes($row['imagename']);
$prod_id = "id=" . $_GET["id"];
$position = $_GET['image_position'];
echo $returnurl . $prod_id . $image1 . $image2 . $image3 . $newimage ;
?>Cheers
Kevin