<?php header("Access-Control-Allow-Origin: *"); $ecodedata = $_POST["postdata"]; // echo "server say::".($ecodedata); //base64_decode $b= json_decode ($ecodedata); $x= $b->x; $y= $b->y; $z= $b->z; //echo "data checking...[".$z."]"; //$id=$z; $ownid=$z; $packid=$y; ?> <?php require_once "ssession.php";?> <?php // Initialize the session session_start(); // Check if the user is logged in, if not then redirect him to login page if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){ // header("location: login.php"); // exit; } $id=$_SESSION["uid"] ; $username=$_SESSION["username"]; // $guser=$_SESSION["guser"]; //$ownid=$_GET["ownid"]; //$packid=$_GET["packid"]; ?> <?php require_once "configs.php"; // Check input errors before inserting in database // Prepare an insert statement // Prepare an insert statement $sql = "INSERT INTO titan (title,titanid,status) VALUES (?, ?,?)"; $stmt = $db->prepare($sql); // Set parameters $param_title = "Submit Form55"; $param_titanid = $ownid; $param_status=3; $title=$_GET["title"]; $param_title ="php?packid=".$packid."&ownid=".$ownid."&title=".$title.">Checking Link</a>"; $param_titanid=$ownid; $stmt = $db->prepare($sql); $stmt->bindParam(1,$param_title ); $stmt->bindParam(2,$param_titanid ); $stmt->bindParam(3,$param_status); $stmt->execute(); //echo "$param_titanid ,$param_status"; // $res = $db->query($sql); //echo "OK"; $sql = "update dyna set submit='1' ,submit_dt=CURRENT_TIMESTAMP where ownerid=".$ownid." and packid=".$packid; //echo "started ".$sql; $res = $db->query($sql); // $ret = $db->exec($sql); //echo "Submit successfully to $ownid $packid"; echo "OK"; // include "s_asqpl.php"; // Close statement //$packid=$_GET["packid"]; //$/ownid=$_GET["ownid"]; //$title=$_GET["title"]; ?>
Edit file:zcreate_titan.php2309