I want to print value in $s1 $ s2 $s3 instead of variable name. When value is sent in database then there goes only variable names $s1,$s2,$s3 etc not values in them.
<?php
echo $s1=$_POST['1'];
echo $s2=$_POST['2'];
echo $s3=$_POST['3'];
echo $s4=$_POST['4'];
$proo=$_POST['proo'];
$semm=$_POST['semm'];
$shii=$_POST['shii'];
$secc=$_POST['secc'];
$subb=$_POST['subb'];
if($btnn)
{
$sele=mysql_query("select * from `sconfirmed` where `pro`='$proo' && `sem`='$semm' && `section`='$secc' && `shift`='$shii' ");
$count=mysql_num_rows($sele);
$b='1';
do
{
$a='1';
$s='$s';
while($ro=mysql_fetch_array($sele))
{
$pic=$ro['pic'];
$sname=$ro['sname'];
$rollno=$ro['rollno'];
$sfather=$ro['sfather'];
$phone=$ro['phone'];
$email=$ro['email'];
$address=$ro['address'];
$dob=$ro['dob'];
$iddd=$ro['id'];
$sess=$ro['ses'];
$c=$s.$a;
$insert=mysql_query("insert into `markssub1`(`sid`,`sname`,`sem`,`sec`,`pro`,`shi`,`rollno`,`ses`,`tid`,`tname`,`subject`,`marks`) values ('$iddd','$sname','$semm','$secc','$proo','$shii','$rollno','$sess','$id','$user','$subb','$c') ");
$a=$a+1;
}
}
while($count<=$b);
}
?>