Stack Overflow Asked by Abdulrahman Mohamed on January 6, 2021
<form method="post" action="">
<input type="text" class="form-control" name="name" placeholder="some name">
<input type="text" class="form-control" name="code" placeholder="123456">
<input type="submit" class="btn btn-info" value="Submit" name="submit" />
</form>
<br>
<?php
//submit data
if (isset($_POST['submit'])) {
echo $_POST['name']."<br/>";
echo $_POST['code']."<br/>";
}
?>
that was my index.php and i want to post data into this form from another web page and get response by using php
Set the action-attribute to anotherwebpage.php and catch the values with the $_POST-Variables. So you basically move your PHP-block to anotherwebpage.php.
Answered by Bernhard on January 6, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP