I have the following php snippet. I am working on an android program and need to somehow pass in the ‘pid’. How can I do this so that it will return the form with the given pid? Can I do this without passing in a parameter using a POST request?
<?php
if(isset($_GET['resp']) == "success")
{
echo '<div class="success-box" style="font-size: 16px; padding: 20px;">Success</div>';
}
else {
require_once('connect.php');
$pid = $_SESSION['pid'];
$qry1 = mysql_query("SELECT * FROM table WHERE pid = '$pid'");
if(mysql_num_rows($qry1) > 0)
{
$result = mysql_fetch_array($qry1);
...
?>
use hidden variable in your form
<input type="hidden" id="pid" name="pid" value="give the value" />and use it like
$pid = $_POST['pid']