Created
March 2, 2014 17:56
-
-
Save nicolapiz/9310650 to your computer and use it in GitHub Desktop.
fichero php que se encarga de comprobar la existencia del registro y si no ingresarlo. incluie la clase clase.php que nos sirve para el Ej2 y Ej3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
include_once ("clase.php");// incluyo las clases a ser usadas | |
$usu= new Usuario($_POST["id"]); | |
if($usu->nombre!=""){ | |
echo "1"; | |
} | |
else | |
{ | |
$usu->setID($_POST["id"]); | |
$usu->setNombre($_POST["name"]); | |
$usu->setApellido($_POST["surname"]); | |
$usu->save(); | |
} | |
?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment