phpにpostされたデータをinclude_onceで外部ファイルに接続しました。
外部ファイルはjsで動いています
includeしたファイルでphpにpostされたデータを扱うにはどうすればよろしいですか
test.php
1<?php 2 3if ($_SERVER["REQUEST_METHOD"] === "POST") { 4 $jdata = $_POST["jdata"]; 5 include_once("sample.html"); 6} 7
sample.html
1<html lang="ja"> 2 <head> 3 <script type="text/javascript"> 4 //ここで$jdataを使いたい 5 </script> 6 </head> 7 8</html>
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/18 06:10