Jump to content

very simple, url varible passing... not working.... cant see why, can anyone hel


paulhagerty

Recommended Posts

very simple

 

the url

 

http://www.pukkapine.co.uk/admin/deleteproducts.php?pID=1

 

i can not get the varible pID... the deleteproducts.php code is below

 

it does not make any sense.... please help

 

 

 

<div align="center"><br>

  Are You <strong>Sure</strong> you want to delete this product<br> <?php echo $pID; ?>

 

<br>

  <br>

  <a href="deleteproductsconfirmed.php?pID=<?php echo $pID; ?>">Yes</a> ------------ <a href="listproducts.php">No</a></div>

 

hmm

 

www.yoursite.com/index.php?pID=x

 

 

<?php

if(isset($_GET['pID'])
{
        //The variable exists so set $pID to equal the value
        $pID = $_GET['pID'];
}
       //The variable is not set
       $pID = '';
}

if($pID != '')
{
     //pID is not null/empty so run some code

}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.