Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
Created March 25, 2017 18:25
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 phpfiddle/63e00fbe20b7a3f4606965b8c1c540dd to your computer and use it in GitHub Desktop.
Save phpfiddle/63e00fbe20b7a3f4606965b8c1c540dd to your computer and use it in GitHub Desktop.
[ Posted by Leonard ] 12345677889
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h2>Tema</h2>
<form method="POST">
<div class="form-group">
<label for="text">Variabiala 1:</label>
<input type="text" name="numar">
</div>
<div class="form-group">
<label for="text">Variabiala 2:</label>
<input type="text" name="numar1">
</div>
<div class="form-group">
<label for="text">Variabiala 3:</label>
<input type="text" name="numar2">
</div>
<div class="form-group">
<label for="text">Variabiala 4:</label>
<input type="text" name="numar3">
</div>
<button type="submit" class="btn btn-default">Calculeaza</button>
</form>
</div>
<?php
function calcul($var=0, $var1=0)
{
return $_POST['numar'] + $_POST['numar1'];
};
echo calcul;
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment