Php form Demo


Download 294.31 Kb.
Pdf ko'rish
bet2/2
Sana18.06.2023
Hajmi294.31 Kb.
#1598238
1   2
Bog'liq
9-amaliy ish

" . $txt1 . "

";
echo "Study PHP at " . $txt2 . "
";
echo $x + $y;
?>
$cars = array("Volvo", "BMW", "Toyota");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
?>



Name:
type="text"
name="name"
required="required"
placeholder="Enter your name" />


Email:
type="email"
name="email"
required="required"
placeholder="Enter your email" />

Subscribe


//---------------------------------------------
// WARNING: this doesn't include sanitization
// and validation
//---------------------------------------------
if (isset($_POST['name'], $_POST['email'])) {
$name = $_POST['name'];
$email = $_POST['email'];
// show the $name and $email
echo "Thanks $name for your subscription.
";
echo "Please confirm it in your inbox of the email $email.";
}
else {echo 'You need to provide your name and email address.';}
?>
Download 294.31 Kb.

Do'stlaringiz bilan baham:
1   2




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling