How to Pass a Sub ID in PHP
- 1). Open your PHP editor and open the main page from which you want to send the sub ID and the processing page to which you want to send it.
- 2). Create the form variable that contains the sub ID value in the "form" tag. The following code creates a sub ID hidden value in the PHP form:
echo "<input type='hidden' name='subid' value='00'>";
Replace the "00" value with the value you want to pass to your processing page. - 3). Close the PHP form page and open the page that you want to use to process and retrieve the form value. Add the following code to the processing page:
$subid = $_POST['subid']; - 4). Display the value. If you want to display the sub ID value, use the following code:
echo $subid;
Source...