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>

 

Link to comment
Share on other sites

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

}
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.