<?php 
session_start();
include 'dbc.php';

date_default_timezone_set("Asia/Karachi");
$today=date("Y-m-d");

$userid=$_SESSION["userid"];
$username=$_POST["username"];
$password=$_POST["password"];
$camp=$_POST["camp"];


$sql = "Insert into users (id,userid,userpwd,username) values (null,'$camp','$password','$username')";
$conn->query($sql);


$sql1="Select * from userright";
$result1 = $conn->query($sql1);

 while($row1 = $result1->fetch_assoc()) {
    $feedisc1=$row1['feedisc1'] ;
	$feedisc2=$row1['feedisc2'] ;
	$feedisc3=$row1['feedisc3'] ;   
	  
	 $sql2 = "Insert into adduser (id,feedisc1,feedisc2,feedisc3,uname) values (null,'$feedisc1','$feedisc2','$feedisc3','$username')";
$conn->query($sql2);
	  
	
	 }

header("location:Add_Users.php");

?>
