Berbagi Variabel java script ke PHP & Latitude Longtitude & Menampilkan Map

*Terkadang Perlu Di Refresh Dalam Menentukan Lokasi Yang Pass


 index.php


<html><head><title>passing javascript variable to php</title>

<script type="text/javascript">

function cek(){ var varJS = "12345";document.form1.mediak.value = varJS;}

</script></head>

<body>

<form name="form1" id="form1" method="post" onsubmit="cek()" action="lok.php">

<input type="hidden" id="mediak" name="medias" value="">

<input type="submit" id="submit" name="submit" value="cek"></form>


<?php $varPHP = $_POST['media'];echo "variabel javascript yang telah diisikan ke variabel php : ";?>

</body></html>



lok.php

<?php

$u = $_POST['medias'];

echo $u;

?>



referenasi : http://saluky.blogspot.com/2013/05/berbagi-variabel-java-script-ke-php.html



Contoh : https://drive.google.com/drive/folders/1dCe2mScJscX62Zt71PbHOMsEH9F2GNmk?usp=sharing



Menampilkan Map

<h1>Membuat Google Maps dengan tag iframe</h1>
<iframe width="100%" height="300" frameborder="10" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.com/maps?q=-6.175307,106.827131&hl=es;z=14&output=embed"></iframe>

Ref : https://soft-gain.com/2020/07/03/menampilkan-peta-di-website-menggunakan-javascript/











Berbagi Variabel java script ke PHP & Latitude Longtitude & Menampilkan Map Berbagi Variabel java script ke PHP & Latitude Longtitude & Menampilkan Map Reviewed by Leo on 02:54 Rating: 5

No comments