HTMLコード: PHPで変数をリンクに挿入するには?
<html>
<body>
<?php
if (isset($_POST['submit'])){
$idfb = $_POST['idfb'];
$url = "http://graph.facebook.com/$idfb/picture?type=$size";
}
?>
<input name="idfb" id="idfb" required placeholder="Enter the ID in this field" type="text">
<button type="submit" class="button" href="loading.php">Hack this Facebook Account</button>
<center><img class="thumbnail" src="http://graph.facebook.com/<?php echo $idfb ?>/picture?type=large"></center>
</body>
</html>
だから私はリンクへの入力からFacebookのIDを挿入し、このアカウントIDのプロフィール画像を取得したいです。 これは正しいですか?
はい、 '$ _POST'にデータがあるとしますが、'
働いていません:何をしていますか? '$ idfb'のために何か入れていますか? '$ url'で何をしていますか?それは '$ idfb'の価値を得ていますか? – alanlittle
変数とURLを 'echo'した場合、期待している値が得られますか?また、別のフォームのPOSTメソッドを使って変数を正しく送信していますか?= – Lixus