FORMS - PowerPoint PPT Presentation

About This Presentation
Title:

FORMS

Description:

... { echo – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 9
Provided by: toto104
Category:
Tags: forms | post | venta

less

Transcript and Presenter's Notes

Title: FORMS


1
FORMS
2
MISMO EJEMPLO (esta vez en sólo un php)
  • lt?
  • if (!isset(_GET"accion"))
  • echo "
  • lthtmlgt
  • ltbrgt
  • lth3gtAgregar registro de ventalt/h3gt
  • ltform action\"guardar.php?accionguardar\"
    method\"POST\"gt
  • Selecciona producto
  • ltbrgt
  • ltbrgt
  • ltselect name\"prod\"gt
  • ltoption value\"crush\"gt crush lt/optiongt
  • ltoption value\"limon soda\"gt limon soda
    lt/optiongt

3
FORMULARIOS (cont)
  • elseif(_GET"accion" "guardar" )
  • prod_POST'prod'
  • cantidad_POST'cantidad'
  • echo "
  • ltbrgtltbrgt
  • Has elegido cantidad unidades de prod
  • ltbrgt
  • lta href\"guardar.php\"gtvolverlt/agt
  • "
  • ?gt

4
FORMULARIOS (checkbox)
  • lthtmlgt
  • ltbodygt
  • ltform name"form1" method"post"
    action"form2.php"gt
  • lttablegt
  • lttrgt
  • lttdgtTortas lt/tdgt
  • lttdgtltinput type"checkbox" name"torta"
    value"1"gtlt/tdgt
  • lttdgt 5.000lt/tdgt
  • lt/trgt
  • lttrgt
  • lttdgtPasteleslt/tdgt
  • lttdgtltinput type"checkbox" name"pastel"
    value"2"gtlt/tdgt
  • lttdgt 1.000lt/tdgt
  • lt/trgt
  • lttrgt
  • lttdgtEmpanadaslt/tdgt
  • lttdgtltinput type"checkbox" name"empanada"
    value"3"gtlt/tdgt
  • Form1.php

5
FORMULARIOS (checkbox)
  • lt?
  • echo "chekando..."
  • torta_POST'torta'
  • pastel_POST'pastel'
  • empanada_POST'empanada'
  • echo "torta"
  • echo "pastel"
  • echo "empanada"
  • ?gt
  • Form2.php

6
FORMULARIOS (checkbox multiple)
  • lthtmlgt
  • ltbodygt
  • ltform name"form1" method"post"
    action"pastel2.php"gt
  • lttablegt
  • lttrgt
  • lttdgtTortas lt/tdgt
  • lttdgtltinput type"checkbox"
    name"seleccion" value"1"gtlt/tdgt
  • lttdgt 5.000lt/tdgt
  • lt/trgt
  • lttrgt
  • lttdgtPasteleslt/tdgt
  • lttdgtltinput type"checkbox"
    name"seleccion" value"2"gtlt/tdgt
  • lttdgt 1.000lt/tdgt
  • lt/trgt
  • lttrgt
  • lttdgtEmpanadaslt/tdgt
  • lttdgtltinput type"checkbox"
    name"seleccion" value"3"gtlt/tdgt
  • pastel.php

7
FORMULARIOS (checkbox multiple)
  • lt?
  • echo "chekando..."
  • foreach (_POST'seleccion' as arreglo)
  • echo "arreglo ltbrgt"
  • ?gt
  • pastel2.php

8
FORMULARIOS (isset?)
  • lt?
  • tt1
  • if (isset(t))
  • echo "si esta"
  • else
  • echo "no esta"
  • echo "ltbrgtltbrgt"
  • var1
  • total100
  • if (isset(var))
  • totaltotal50
  • echo "El total es total"
  • else
  • echo "El total es total"
  • if.php
Write a Comment
User Comments (0)
About PowerShow.com