2015-04-20 59 views
-2

我执行一些PHP代码。 在此之后,我想发送一个值到另一个PHP站点,我想通过$_POST使用它。我不需要会话或cookies或反正。发送无变量邮件

else if ($tag == 'in_accepted') { 
     $coni=mysqli_connect("localhost","LOGIN","PW","movement"); 
     $tablename = $_POST['tablename']; 
     $jsonString = $_POST['json']; 
     $jArray = json_decode($jsonString, true); 
     $comment = $_POST['comment']; 
     $result2 = mysqli_query($coni, "ALTER TABLE `$tablename` COMMENT = '$comment'"); 
     $response["comment_succes"] = 1; 
     foreach($jArray as $key => $value){ 
      $ean = $value["ean"]; 
      //$trimmedean = substr($ean, 0, 3) .".". substr($ean, 3, 4) .".". substr($ean, 7, 4); 
      //$result = mysqli_query($coni,"INSERT INTO `$tablename` (unique_id, ean, accepted) VALUES ('$uuid', '$trimmedean', '0')"); // or die(mysql_error()); 
      $result = mysqli_query($coni, "UPDATE `$tablename` SET accepted='1' where ean='$ean'"); 
      } 
       if ($result > 0) { 
        $response["success"] = 1; 
        !!!!SEND $tablename to URL.php 
        echo json_encode($response); 
      } 
     else { 
        $response["error"] = 1; 
        echo json_encode($response); 
     } 
+2

谁上传了此帖? ¡\\ _(ツ)_ /¯ –

+0

http://www.stoimen.com/blog/2010/09/08/http-post-with-php-without-curl/我foudn有用的链接 – zauber3r

回答

0
  1. 使用curl数据发布到指定的URL。
  2. 制作一个动态表单并自动将其与js脚本/ jquery一起提交。
+0

我会尝试明天,thx – zauber3r