Mohibur Rashid
Ваш вопрос вообще не имеет никакого смысла. Любым способом. Попробовать это
# index.html
# taken from w3school.
<!DOCTYPE html>
<html>
<body>
<h2>HTML Forms</h2>
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname" value="Mickey">
<br>
Last name:<br>
<input type="text" name="lastname" value="Mouse">
<br><br>
<input type="submit" value="Submit">
</form>
<p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".</p>
</body>
</html>
# action_page.php
<?php
$msg="";
if (isset($_GET['submit'])==true) {
$firstname=isset($_GET['firstname'])?$_GET['firstname']:"";
$lastname=isset($_GET['lastname'])?$_GET['lastname']:"";
$msg="firstname=".$firstname."&lastname=".$lastname." ";
} else {
$msg="Invalid requeset";
}
?><!DOCTYPE html>
<html>
<head>
<title>Forms action page</title>
</head>
<body>
<h1>Submitted Form Data</h1>
<h2>Your input was received as:</h2>
<div style="word-wrap:break-word"><?=$msg?>
</div>
</div>
</body>
</html>
Как работает отправка данных в php