<?php
require'../connections/conn.php';
$new_test=$_GET['new_test'];
$main_app=$_GET['app_main'];
$app=$_GET['app'];
$test=$_GET['test'];
$p=$_GET['p'];

$old="select * from `appointment` where `app_id`=$app";
$rold=$conn->query($old);
while($row2=mysqli_fetch_array($rold))	
{
	echo $test=($row2['test']);

}

 $all=$test."
 ".$new_test;
  $set="UPDATE `appointment` SET `test`='$all' WHERE  `app_id`=$app ";
	$s=$conn->query($set);
	
	//header("location:detail.php?app_id=$main_app&&p_id=$p");
	
	echo "<script type='text/javascript'>window.location.href = 'detail.php?app_id=$main_app&&p_id=$p'</script>";
?>