this is the script i was trying to write
$url_extq_data = array();
if (isset($_REQUEST))
{
foreach($_REQUEST as $key=>$value)
{
// only get the data for extra questions
$schq = "SELECT * FROM extraq WHERE programid='$programid'";
$schr = mysql_query($schq);
while($schrow=mysql_fetch_array($schr))
{
$thisqid = $schrow["id"];
$tagit = $schrow["tagit"];
if ($thisqid==$key)
{
$addq3 = "INSERT INTO extraqopt (extraqid, value, subid) VALUES ('$thisqid', '$value', '$subid')";
$addr3 = mysql_query($addq3);
// add data add to array ready for send
$url_extq_data = $tagit => $value;
}
}
}
}