There are two fundamentally different ways.
script.php? product_id = 6490057-6553652-6582008
then
$produnct_ids = explode('-',$_GET['product_id']); //$produnct_ids[1] == 6553652;
script.php? product_id [] = 6490057 & product_id [] = 6553652 & product_id [] = 6582008;
then
$produnct_ids = $_GET['product_id']; //$produnct_ids[1] == 6553652;
The second method is preferable. Client side implementation:
<input type="text" name="produnct_id[]" value="6490057" /><br /> <input type="text" name="produnct_id[]" value="6553652" /><br /> <input type="text" name="produnct_id[]" value="6582008" /><br />
Pay attention to the brackets !!!
UPD
The resulting $ product_ids arrays are identical. Through the echo it can be output as follows:
echo '<pre>'.print_r($product_ids,true).'</pre>';
or so:
echo implode(',',$product_ids);
or so:
foreach($product_ids as $id){ print($id.'<br />'); }