<html>
<head>
<title>Registration Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<?php if (isset($_POST['form_submitted'])): ?>
<h2>Thank You <?php echo $_POST['firstname']; ?> </h2>
<p>You have been registered as
<?php echo $_POST['firstname'] . ' ' . $_POST['lastname']; ?>
</p>
<p>Go <a href="/registration_form.php">back</a> to the form</p>
<?php else: ?>
<h2>Registration Form</h2>
<form action="registration_form.php" method="POST">
First name:
<input type="text" name="firstname">
<br> Last name:
<input type="text" name="lastname">
<input type="hidden" name="form_submitted" value="1" />
<input type="submit" value="Submit">
</form>
<?php endif; ? >
</body>
</html>



කොච්චර resources තියේද net එකේ
PHP:<html> <head> <title>Registration Form</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <?php if (isset($_POST['form_submitted'])): ?> <h2>Thank You <?php echo $_POST['firstname']; ?> </h2> <p>You have been registered as <?php echo $_POST['firstname'] . ' ' . $_POST['lastname']; ?> </p> <p>Go <a href="/registration_form.php">back</a> to the form</p> <?php else: ?> <h2>Registration Form</h2> <form action="registration_form.php" method="POST"> First name: <input type="text" name="firstname"> <br> Last name: <input type="text" name="lastname"> <input type="hidden" name="form_submitted" value="1" /> <input type="submit" value="Submit"> </form> <?php endif; ? > </body> </html>
ඇයි youtube එකේ එහෙම tutorials බලන්නෙ නෑ???කොච්චර resources තියේද net එකේ
Thanks මචං.. internet එකේ හැම තැනම තියෙනවා.. ඒත් අවුල්
කරන් යද්දි අවුලක් ආවොත් අහන්ඩ මචන්
<?php
$conn = mysqli_connect("localhost", "root", "", "test");
$name = $_POST['username'];
$pass = $_POST['password'];
$s = "select * from users where username = '$name'";
$result =mysqli_query ($conn, $s);
$num = mysqli_num_rows($result);
if ($num==1) {
echo "Username already taken";
}
?>
මේ දවස් ටිකේ කට්ටක් කාල php login project එකක් කලා. මම හොදට css දන්න නිසා වැඩේ ලස්සනට ගියා. පදන්න කෙනෙක් මට කියා දීපන්කො Payment Getway එකක් ආදන්නෙ කොහමද කියල? ලංකාවෙ බැංකු, Dialog ez cash වගේ?
![]()

Responsive da machan ??![]()
මේ දවස් ටිකේ කට්ටක් කාල php login project එකක් කලා. මම හොදට css දන්න නිසා වැඩේ ලස්සනට ගියා. පදන්න කෙනෙක් මට කියා දීපන්කො Payment Getway එකක් ආදන්නෙ කොහමද කියල? ලංකාවෙ බැංකු, Dialog ez cash වගේ?
![]()