Programa llamado insert.html



Similar documents
DECLARATION OF PERFORMANCE NO. HU-DOP_TD-25_001

Apéndice C: Código Fuente del Programa DBConnection.java

Hacking de aplicaciones Web

New Server Installation. Revisión: 13/10/2014

Propiedades del esquema del Documento XML de envío:

DEPARTMENT OF INFORMATION TECHNOLOGY

CA Dream Application References

Para perfeccionistas con deadlines

Form Handling. Server-side Web Development and Programming. Form Handling. Server Page Model. Form data appended to request string

PROGRAMA DE GRAFICACIÓN DE VELOCIDADES EN VENTANAS DE MAPINFO

Estructura de aplicación en PHP para System i

New words to remember

Annual Notice of Changes for 2015

Create dynamic sites with PHP & MySQL

Monitoreo de Bases de Datos

Monterey County Behavioral Health Policy and Procedure

Java Server Pages combined with servlets in action. Generals. Java Servlets

Benedictine College Financial Aid

A Simple Shopping Cart using CGI

BtoB MKT Trends. El Escenario Online. Luciana Sario. Gerente de Marketing IDC Latin America 2009 IDC W W W. I D C. C O M / G M S 1

Independent

An introduction to web programming with Java

USER MANUAL MONITORING MODULE

PROFEX REGISTRATION IN THE SYSTEM FOR LANGUAGE ASSISTANTS

Baylor University Policy No

SUBCHAPTER A. AUTOMOBILE INSURANCE DIVISION 3. MISCELLANEOUS INTERPRETATIONS 28 TAC 5.204

Annual Notice of Changes for 2015

manual de visual foxpro 6 PDF

FREE Tutoring for your child!

CREATE SCHEMA IF NOT EXISTS `FIV` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; USE `FIV` ;

1. DESCRIPCIÓN DE WEB SERVICES DE INTERCAMBIO DE DATOS CON NOTARIOS

Curso SQL Server 2008 for Developers

PHP and XML. Brian J. Stafford, Mark McIntyre and Fraser Gallop

Download: Server-side technologies. WAMP (Windows), MAMP (Mac),

UMBRELLA POLICY PACKET. RACHEL J LAWRENCE November 25, WURZBACH RD APT 1701 SAN ANTONIO TX Important Messages

Python and MongoDB. Why?

Dictionary (catálogo)

Setup and Administration for ISVs

Itelpop Simple Screenpop Web Application Installation & Configuration Guide Version 1.0

I M M I G R A N T WORKERS HEALTH & SAFETY

RIGGING CONDITIONS AND PROCEDURES

Using Cloud Databases in the Cloud Control Panel By J.R. Arredondo

Curso SQL Server 2012 para Desarrolladores

PERSONAL INFORMATION / INFORMACIÓN GENERAL Last Name / Apellido Middle Name / Segundo Nombre Name / Nombre

Sample Code with Output

OMEGA SOFT WF RISKEVAL

ATTENTION TRAINERS AND BOOKKEEPERS

<head> <meta content="text/html; charset=utf-8" http-equiv="content-type" /> <title>my First PHP Lab</title> </head>

Introducción a las bases de datos SQL Libro de referencia

Impreso de Solicitud / Application Form

Application note: Connecting the to a Database

ECCAIRS 5 Instalación

The named boxes in Spanish of the form are included in italics inside parentheses. MINISTERIO DE ECONOMÍA Y COMPETITIVIDAD

Slides from INF3331 lectures - web programming in Python

Schema XML_PGE.xsd. element GrupoInformes. attribute XML_PGE.xsd unqualified qualified

Tema: Encriptación por Transposición

How To Know If An Ipod Is Compatible With An Ipo Or Ipo (Sanyo)

CIS 433/533 - Computer and Network Security. Web Vulnerabilities, Wrapup

Telefónica`s integrated approach to energy efficiency and climate change

FAMILIES 2014 SOTX INFORMATION GUIDE

Altas, Bajas y Modificaciones de Registros en tabla MYSQL

Developing Perl, PHP, Python, and Ruby on Rails Applications

Web Application Development

In this chapter, you will learn how to...

The named boxes in Spanish of the form are included in italics inside parentheses. MINISTERIO DE ECONOMÍA Y COMPETITIVIDAD

Creation of Computer Aided Manufacturing software from Computer Aided Design software in the milling process

Medicare Part D Creditable Coverage Notice Open Enrollment Active Carpenters

Stretching your health care dollars Aetna HealthFund Health Reimbursement Arrangement (HRA) Plan

Daytime Telephone Number (Número Telefónico) Date of Application (Fecha) County (Condado)

HTML Lesson 7. Your assignment:

Reference Guide to complete an AFIP form 4550 General resolution No of the Administración Federal de Ingresos Públicos (AFIP)

Special Programs. Extended Day/Week Tutorial Program Guidelines

SUBCHAPTER A. AUTOMOBILE INSURANCE DIVISION 3. MISCELLANEOUS INTERPRETATIONS 28 TAC 5.204

Other Language Types CMSC 330: Organization of Programming Languages

FAMILY INDEPENDENCE ADMINISTRATION Seth W. Diamond, Executive Deputy Commissioner

Automating MT post-editing using regular expressions

SCA database and search engine. Vignir Barði Einarsson. Supervisor: Nik Whitehead. Faculty of Information Technology, University of Akureyri

How To Use A Transport X Portable Dga

Membuat Aplikasi Berita Sederhana

How To Get A Venezuela Business Visa

UNIVERSIDAD NACIONAL AUTÓNOMA DE MÉXICO DIRECCIÓN GENERAL DE COOPERACIÓN E INTERNACIONALIZACIÓN (DGECI)

WSFCCA MEMBERSHIP and ACCIDENTAL/MEDICAL APPLICATION

ANNUAL NOTICE OF CHANGES FOR 2016

Server-side: PHP and MySQL (continued)

Transcription:

Programa llamado insert.html <HTML> <!-- comentarios --> <HEAD> <TITLE> datos generales </TITLE> </HEAD> <BODY> <center> <h2><i>registro de Producto</i></h2> <FORM Action="cgi-bin/insert.pl" METHOD=Post> <TABLE border=0> <TR > <TD> NUMERO DE IDENTIFICACION : </td> <TD Colspan=1> <input type=text name="id"> </td> <TR> <TD> NOMBRE :</td> <TD Colspan=2> <input type=text name="nombre"> </td> <TR> <TD> PRECIO :</td> <TD Colspan=3> <input type=text name="precio"> </td> <tdalign=center > <input type="submit" name=boton1 value="alta "> </td> </tr> </table> </form> </BODY> </HTML> Programa en perl llamado insert.pl #!/usr/bin/perl -w use strict; use CGI;

use DBI; my $q = new CGI; my $db="producto#maq"; my $tabla="articulos"; my $driver="mysql"; my $usuario="root"; my $id; my $nombre; my $precio; print $q->header("text/html"); print $q->start_html(-title =>"informacion"); print"\n"; $id =$q->param('id'); $nombre =$q->param('nombre'); $precio =$q->param('precio'); my $dbh=dbi->connect("dbi:$driver:$db",$usuario) die "\n error al abrir la base de datos"; my $resultado=$dbh->do ("insert into $tabla (id, nombre, precio) values ('$id', '$nombre','$precio');") warn "error al insertar datos"; print " <CENTER>\n"; print " <TABLE Border=1 >\n"; print " <TR ><TH colspan=2>datos </TH></TR>\n"; print " <TR ><Td> Nombre :</Td><td>$nombre</td></TR>\n"; print " <TR ><Td> id :</Td><td>$id</td></TR>\n"; print " <TR ><Td> precio :</td><td>$precio</td></tr>\n"; print " </TABLE>\n";

print " </CENTER>\n"; $dbh->disconnect warn "\fallo al desconectarse"; print $q->end_html(); Este programa es el código HTML que manda llamar a un CGI. Programa en llamado selectnombre.html

<HTML> <!-- comentarios --> <HEAD> <TITLE> datos generales </TITLE> </HEAD> <BODY> <center> <h2><i>registro de Producto</i></h2> <FORM Action="cgi-bin/selectnombre.pl" METHOD=Post> <TABLE border=0> <TR ><Td> Nombre : </td> </tr> </table> </form> </BODY> </HTML> <td Colspan=3> <input type=text name="nombre"></td> <tdalign=center > <input type="submit" name=boton1 value="busqueda "> </td> Programa en perl llamado selectnombre.pl #!/usr/bin/perl -w use strict; use CGI; use DBI; my $q = new CGI; my $db="producto#maq"; my $tabla="articulos";

my $driver="mysql"; my $usuario="root"; my $id; my $nombre; print $q->header("text/html"); print $q->start_html(-title =>"informacion"); print"\n"; $nombre =$q->param('nombre'); my $dbh=dbi->connect("dbi:$driver:$db",$usuario) die "\n erro al abrir la base de datos"; my $sth=$dbh->prepare ("select * from $tabla where nombre='$nombre'"); $sth->execute(); while (my $ref=$sth->fetchrow_hashref()){ $id=$ref->{id}; $nombre=$ref->{nombre}; print " <CENTER>\n"; print " <TABLE Border=1 >\n"; print " <TR ><TH colspan=2>datos </TH></TR>\n"; print " <TR ><Td> Nombre :</Td><td>$nombre</td></TR>\n"; print " <TR ><Td> id :</Td><td>$id </td></tr>\n"; print " </TABLE>\n"; print " </CENTER>\n"; } $sth->finish(); $dbh->disconnect warn "\fallo al desconectarse"; print $q->end_html();

Programa llamado delete.html <HTML> <!-- comentarios --> <HEAD> <TITLE> datos generales </TITLE> </HEAD> <BODY> <center> <h2><i>borar productos</i></h2> <FORM Action="cgi-bin/delete.pl" METHOD=Post>

<TABLE border=0> <TR> <TD> NUMERO DE IDENTIFICACION :</td> <TD Colspan=2> <input type=text name=id> </td> <tdalign=center > <input type="submit" name=boton1 value="borrar "> </td> </tr> </table> </form> </BODY> </HTML> Programa en perl llamado delete.pl #!/usr/bin/perl -w use strict; use cgi; use dbi; my $q = new cgi; my $db="producto#maq"; my $tabla="articulos"; my $driver="mysql"; my $usuario="root"; my $id; my $nombre; my $precio; print $q->header("text/html"); print $q->start_html(-title =>"informacion"); print"\n"; $id =$q->param('id');

my $dbh=dbi->connect("dbi:$driver:$db",$usuario) die "\n erro al abrir la base de datos"; my $sth=$dbh->prepare ("select * from $tabla where nombre='$id"); $sth->execute(); while (my $ref=$sth->fetchrow_hashref()){ $id1=$ref->{id}; $nombre=$ref->{nombre}; $precio=$ref->{precio}; print " <CENTER>\n"; print " <TABLE Border=1 >\n"; print " <TR ><TH colspan=2>datos </TH></TR>\n"; print " <TR ><Td> Nombre :</Td><td>$nombre</td></TR>\n"; print " <TR ><Td> id :</Td><td>$id </td></tr>\n"; print " </TABLE>\n"; print " </CENTER>\n"; if($id==$id1) { my $resultado=$dbh->do ("delete from $tabla where (id='$id');") warn "error al borrar datos datos"; } } $dbh->disconnect warn "\fallo al desconectarse"; print $q->end_html(); enlazando dos.pl <HTML> <!-- comentarios --> <HEAD>

<TITLE> datos generales </TITLE> </HEAD> <BODY> <center> <h2><i>datos a modificar</i></h2> <FORM Action="cgi-bin/modificar.pl" METHOD=Post> <TABLE border=0> <TR> <TD> NUMERO DE IDENTIFICACION :</td> <TD Colspan=2> <input type=text name=id> </td> <tdalign=center > <input type="submit" name=boton1 value="modificar "> </td> </tr> </table> </form> </BODY> </HTML> MODIFICAR #!/usr/bin/perl w use strict; use CGI; use DBI; my $q=new CGI; my $db= nombre base de datos ; my $tabla= nombre de la tabla ; my $driver= mysql ; my $usuario= nombre usuario ; my $pass= pasword ; my $nombre; my $precio;

print $q->header( text/htnl ); print $q=start_html(-title=> informacion ); print <center><br> MODIFICACIONES <br></center> ; my $id=$q->param(íd); my $dbh=dbi->connect( dbi:$driver:$bd:$host,$usuario,$pass) die \n eroro al abrir\n ; my $sth=$dbh->prepare( select * from $tabla where id= $id ); $sth->execute(); While (my $ref=$sth->fetchrow_hashref()) { $id=$ref->{id}; $nombre=$ref->{nombre}; $precio=$ref->{precio}; print <form action=modifica1.pl method=post> ; print <center> print <br>id :<input name=id value=$id><br> ; print <br>nombre :<input name=nombre value=$nombre><br> ; print </center> ; print <br> ; print <br> ; print <input type=submit name=boton1 value=modificar><br> ; print </form> ; } $sth->finish(); $dbh->disconnect; print $q->end_htlm(); + modificar1.pl

#!/usr/bin/perl w use strict; use CGI; use DBI; my $q=new CGI; my $db= nombre base de datos ; my $tabla= nombre de la tabla ; my $driver= mysql ; my $usuario= nombre usuario ; my $pass= pasword ; print $q->header( text/htnl ); print $q=start_html(-title=> informacion ); print <center><br> MODIFICACIONES <br></center> ; my $idprov=$q->param(íd); my $nombre=$q->param(nombre); my $dbh=dbi->connect( dbi:$driver:$bd:$host,$usuario,$pass) die \n eroro al abrir\n ; my $sth=$dbh->do( update from $tabla where id= $id nombre=$nombre ); print <center> print <br>id proveedor :<input name=id value=$id><br> ; print <br>nombre print </center> ; print <br> ; print <br> ; } $sth->finish(); $dbh->disconnect; print $q->end_htlm(); :<input name=nombre value=$nombre><br> ;