--------------------------------------------------------------------------------------- index.php
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<title>SA4 :: SISTEMA ACADÊMICO</title>
</head>
<body>
<form action="" name="form" method="post">
<strong>Nome:</strong><br />
<input type="text"id="nome" name="nome"/> <br />
<input type="submit" value="Cadastrar" onclick="form.action='teste2.php'">
<input type="submit" value="Deletar"
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
<title>SA4 :: SISTEMA ACADÊMICO</title>
</head>
<body>
<form action="" name="form" method="post">
<strong>Nome:</strong><br />
<input type="text"id="nome" name="nome"/> <br />
<input type="submit" value="Cadastrar" onclick="form.action='teste2.php'">
<input type="submit" value="Deletar"
onclick="form.action='teste3.php'">
</form>
</body>
</html>
------------------------------------------------------------------------------------------teste2.php
<?php
$nome = $_POST["nome"];
echo"nome = ".$nome."</br>";
echo"cadastrado";
echo '<a href="index.php"> Voltar </a>';
?>
-----------------------------------------------------------------------------------------teste3.php
<?php
$nome = $_POST["nome"];
echo"nome = ".$nome."</br>";
echo"deletado";
echo '<a href="index.php"> Voltar </a>';
?>
</form>
</body>
</html>
------------------------------------------------------------------------------------------teste2.php
<?php
$nome = $_POST["nome"];
echo"nome = ".$nome."</br>";
echo"cadastrado";
echo '<a href="index.php"> Voltar </a>';
?>
-----------------------------------------------------------------------------------------teste3.php
<?php
$nome = $_POST["nome"];
echo"nome = ".$nome."</br>";
echo"deletado";
echo '<a href="index.php"> Voltar </a>';
?>
Nenhum comentário:
Postar um comentário