Last active
November 18, 2019 15:18
-
-
Save ammaridris/2a6ca2d48a16a9d01a7dc1e2bf297951 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('_JEXEC') or die; | |
if(!empty($_REQUEST['act'])) { | |
$act = $_REQUEST['act']; | |
$nama = $_REQUEST['nama']; | |
$email = $_REQUEST['email']; | |
$phone = $_REQUEST['phone']; | |
$mesej = $_REQUEST['mesej']; | |
$soalan = $_REQUEST['soalan']; | |
$mesej = stripcslashes($mesej); | |
$message = "Nama: $nama | |
E.Mail: $email | |
No. Telefon: $phone | |
Maklum Balas: $mesej"; | |
$from = "From: $email"; | |
if($act=="h") { | |
mail("alamat_email@email.com", "Borang Maklum Balas", $message, $from); | |
} | |
} | |
?> | |
<?php if($act!="h") { ?> | |
<form name="maklumbalas" method="post" class="uk-form uk-form-horizontal"> | |
<div class="uk-form-row"> | |
<label class="uk-form-label" for="nama">Nama</label> | |
<div><input id="nama" name="nama" type="text" required></div> | |
</div> | |
<div class="uk-form-row"> | |
<label class="uk-form-label" for="email">Email</label> | |
<div><input id="email" name="email" type="email" required></div> | |
</div> | |
<div class="uk-form-row"> | |
<label class="uk-form-label" for="phone">No. Telefon</label> | |
<div><input id="phone" name="phone" type="text"></div> | |
</div> | |
<div class="uk-form-row"> | |
<label class="uk-form-label" for="mesej">Maklum Balas</label> | |
<div><textarea id="mesej" name="mesej" rows="7" cols="50" required></textarea></div> | |
</div> | |
<div class="uk-form-row"> | |
<label class="uk-form-label" for=""></label> | |
<div><button class="uk-button uk-button-large" type="submit">Hantar</button> <button class="uk-button uk-button-large" type="reset">Reset</button></div> | |
</div> | |
<input name="act" type="hidden" value="h"> | |
</form> | |
<?php } else { ?> | |
<div class="uk-alert uk-alert-success" data-uk-alert=""> | |
<a class="uk-alert-close uk-close"></a> | |
<p>Terima kasih di atas maklum balas anda.</p> | |
</div> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment