paulhagerty Posted April 15, 2010 Share Posted April 15, 2010 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> Quote Link to comment Share on other sites More sharing options...
efficacious Posted April 15, 2010 Share Posted April 15, 2010 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 } ?> Quote Link to comment Share on other sites More sharing options...
Deoctor Posted April 15, 2010 Share Posted April 15, 2010 it is a get variable which u need to fetch first using some thing like this $ID=$_GET['pID']; after this u can use it.. Quote Link to comment Share on other sites More sharing options...
paulhagerty Posted April 15, 2010 Author Share Posted April 15, 2010 yep <?php $pID = $_GET['pID']; ?> at the top of the page sorted it very strange, with a different package on the same host... my other way works fine on many website cheers guys Quote Link to comment Share on other sites More sharing options...
efficacious Posted April 15, 2010 Share Posted April 15, 2010 np glad you got working.. consider error catching tho. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.