Hi frnds,
I need to select some values in old table and send it into newtable. Here i placed my program. Anybody know say the corrections.
<?php
mysql_connect("localhost","root","");
mysql_select_db("menus") or die(mysql_error());
$idvalue=$_REQUEST['id'];
//$iv=$_REQUEST['z'];
$result=mysql_query("select * from smenu where id='$idvalue'");
while($row=mysql_fetch_array($result))
{
$projectid=$row['id'];
$projectname=$row['main'];
$projectcat= $row['itemm'];
$scope=$row['descrip'];
$location=$row['Category'];
$rate=$row['Rate'];
}
echo " $projectid,$projectname,$projectcat,$scope,$location,$rate";
$query="insert into orde values('$projectid','$projectname','$projectcat','$scope','$location','$rate' where id='$idvalue')";
$dbase=mysql_query($query);
echo "$dbase";
?>
</body>
</html>