Skip to content

Instantly share code, notes, and snippets.

@alfintechcomputer
Created November 15, 2020 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfintechcomputer/0d63cc27cdaadde0294be0785ac6e2d6 to your computer and use it in GitHub Desktop.
Save alfintechcomputer/0d63cc27cdaadde0294be0785ac6e2d6 to your computer and use it in GitHub Desktop.
HTML Forms using PHP
<html>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/respond.js"></script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<?php
if(isset($_POST['submit'])) {
echo 'Nice Form Submission!<br>';
} else {
echo 'Stop trying to hack the form fool!';
exit;
}
$website = isset($_POST['website']) ? ($_POST['website']) : 'http://twitter.com' ;
$category = isset($_POST['category']) ? ($_POST['category']) : 'Social' ;
echo "Hi bud, thanks for submitting <b>$website</b> to the <b>$category</b> category.";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment