Login   Register  
PHP Classes
elePHPant
Icontem

File: ejemplo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Gunther González  >  vRIF  >  ejemplo.php  >  Download  
File: ejemplo.php
Role: Example script
Content type: text/plain
Description: Ejemplo de implementación de la clase
Class: vRIF
Validate identifier of entities in Venezuela
Author: By
Last change:
Date: 8 years ago
Size: 1,185 bytes
 

Contents

Class file image Download
<?php
if (isset($_POST["rif"]))
{
    require(
"class.vRIF.php");
    
$rif = new vRIF($_POST['rif'],$_POST['empresa']);
    
$rif->consultarRIF();    
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Validación de RIF</title>
<?php if (isset($rif->mensaje)) { ?> 
<script language="javascript" type="text/javascript">
    alert("<?php echo $rif->mensaje?>");
</script>
<?php ?>
</head>

<body>
    <h1 align="center">Validar RIF</h1>
    <form name="validarRIF" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        <table width="30%"  border="0" align="center">
            <tr>
                <td width="40%">Empresa:</td>
                <td width="60%">
                    <input name="empresa" type="text" id="empresa">
                </td>
            </tr>
            <tr>
                <td>RIF:</td>
                <td>
                    <input name="rif" type="text" id="rif" maxlength="12">
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" value="Consultar">
                </td>
            </tr>
        </table>
    </form>
</body>
</html>