Beruflich Dokumente
Kultur Dokumente
Listagem 1 – Formulario.html
<html>
<head>
<title>Cadastro de Pessoas com PHP OO</title>
</head>
<body>
<form action=cadastra.php method=post>
Nome: <input type=text name=nome><br>
Sobrenome: <input type=text name=sobrenome><br>
Telefone: <input type=text name=telefone><br>
Endereço: <input type=text name=end><br>
<input type=submit value=Cadastrar></form>
</body>
</html>
Prof. Andrea Garcia PROW II
Listagem 2 – Cadastra.php
<html>
<head>
<?php
mysql_query($query,$this->con) or die(mysql_error());
}
function nome_completo() {
$completo = $this->nome." ".$this->sobrenome;
return $completo;
}
function qual_nome() {
return $this->nome;
}
function qual_sobrenome() {
return $this->sobrenome;
}
function qual_end() {
return $this->end;
}
function qual_telefone() {
return $this->telefone;
}
Prof. Andrea Garcia PROW II
} //fim da classe