BTC USD 81,244.1 Gold USD 4,378.12
Time now: Jun 1, 12:00 AM

HTML Question

firlya

Freshie
Messages
6
Joined
Dec 23, 2013
Messages
6
Reaction score
0
Points
3
Nak mintak tolong .. sapa tahu cara macam mana button submit dalam form boleh menyimpan value? coding dlm html.. kawan kata kena ad php skli .. klaw boleh tolong bagi contoh coding html dengan coding php skli. Really nned help =/
 
Nak mintak tolong .. sapa tahu cara macam mana button submit dalam form boleh menyimpan value? coding dlm html.. kawan kata kena ad php skli .. klaw boleh tolong bagi contoh coding html dengan coding php skli. Really nned help =/

sila ubah tajuk kasi lengkap i.e; PHP HTML Question, simpan value ke mana?:-?
 
nk simpan kat mana tu la xtaw .. sekarang ni bos sroh bljaq cmna button submit dpt menyimpan value.. still xdpt gambaran cmna bnda ni berfungsi.
 
<html>
<head>
<title>HTML body tag</title>
</head>
<body style="background-color:#f8f8f8">
<form>
<button name="button" value="OK" type="button">Click Me</button>
</form>
</body>
</html>

button-preview.jpg


mcm ni ke?
 
guna method Post

Contoh <form action="simpan.php" method="post" name="form" id="form" onSubmit="return check_form()">
 
Guna php + mysql
 
Last edited:
guna method Post

Contoh <form action="simpan.php" method="post" name="form" id="form" onSubmit="return check_form()">

yep. disokong. simpan.php tu script yang akan menentukan kat mana data yg di "post" akan pergi/disimpan.

Ehehehe, kalau tak betul minta dibetulkan. Bukan bidang den nih.
 
Nak mintak tolong .. sapa tahu cara macam mana button submit dalam form boleh menyimpan value? coding dlm html.. kawan kata kena ad php skli .. klaw boleh tolong bagi contoh coding html dengan coding php skli. Really nned help =/

contoh byk dekat w2school.. pegi sana belajar PHP.. html tu kena tgk bahagian form... kalau takmo pakai php boleh belajar javascript.. usaha tangga kejayaan.. :)cgrock
 
cik firlya kena buat 2 file iaitu .html dan .php.. ataupun kedua2 nya file .php.. untuk view boleh buat dlm bentuk .html, tapi bila nk simpan value mesti kena ada extension file .php

contoh saya:
file contoh.html

HTML:
<html>
<body>

<form action="welcome.php" method="post">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>

</body>
</html>



file welcome.php

HTML:
<html>
<body>

Welcome <?php echo $_POST["name"]; ?><br>
Your email address is: <?php echo $_POST["email"]; ?>

</body>
</html>

result:
Welcome Administrator
Your email address is [email protected]

tambahan.. nk modified button tu boleh.. guna je contoh brader maxct
default button <input type="submit"> tu je.. selamat mencuba:D
 
Back
Top
Log in Register