Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- echo $_SESSION['enimage'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- $password1 = $_POST['password1'];
- $email = $_POST['email'];
- $orgname = $_POST['category_id'];
- $location = $_POST['category_id1'];
- $building = $_POST['category_id2'];
- $department = $_POST['department'];
- $subcategory=$_POST['subcategory'];
- $firstname=$_POST['firstname'];
- $lastname=$_POST['lastname'];
- $landphone=$_POST['landphone'];
- $mobile=$_POST['mobile'];
- $expirydate=$_POST['expirydate'];
- $image=$_POST['image'];
- $opcode=$_POST['opcode'];
- $addoperator=array(
- 'userName'=>"$username",
- 'passWord'=>"$password",
- 'email'=>"$email",
- 'org_name'=>"$orgname",
- 'loc_name'=>"$location",
- 'building_name'=>"$building",
- 'dept_name'=>"$department",
- 'sub_category'=>"$subcategory",
- 'first_name'=>"$firstname",
- 'last_name'=>"$lastname",
- 'land_number'=>"$landphone",
- 'mobile'=>"$mobile",
- 'expiry_date'=>"$expirydate",
- 'host_image'=>"$image",
- 'opcode'=>"$opcode",
- 'user_id' => $_SESSION['user_id'],
- 'pr_id' => $_SESSION['product_registration_id']
- );
- $addoperator1=json_encode($addoperator);
- echo $addoperator1;
- $url='http://192.168.2.21:8080/Product_Deployment/services/product/wisman/addOperator';
- $data=$whole;
- $ch=curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($addoperator));
- curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
- $response= curl_exec($ch);
- curl_close($ch);
- $jsonde="$response";
- $json_o=json_decode($jsonde);
- $json_a=json_decode($jsonde,true);
- //echo $json_a;
- /*if($json_a[result]=="success")
- {
- header("Location:pmhome.php");
- }
- elseif($json_a[result]=="fail")
- {
- header("Location:pipm.php");
- }*/
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement