• Publicidad

Pasar formulario HTML a Perl

¿Apenas comienzas con Perl? En este foro podrás encontrar y hacer preguntas básicas de Perl con respuestas aptas a tu nivel.

Pasar formulario HTML a Perl

Notapor tolyn » 2012-09-06 15:33 @689

Estimados, soy nuevo en el foro y me gustaría me orientaran. Necesito enviar datos de un formulario a un archivo perl(.pl) y en éste poder realizar consultas a mi base de datos MySQL.

Aquí dejo mi archivo HTML.
Sintáxis: [ Descargar ] [ Ocultar ]
Using html4strict Syntax Highlighting
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  5. <title>Untitled Page</title>
  6. <style type="text/css">
  7. body
  8. {
  9.    background-color: #FFFFFF;
  10.    color: #000000;
  11. }
  12. </style>
  13. <style type="text/css">
  14. a
  15. {
  16.    color: #C8D7EB;
  17.    text-decoration: underline;
  18. }
  19. a:visited
  20. {
  21.    color: #C8D7EB;
  22. }
  23. a:active
  24. {
  25.    color: #C8D7EB;
  26. }
  27. a:hover
  28. {
  29.    color: #376BAD;
  30.    text-decoration: underline;
  31. }
  32. </style>
  33. <style type="text/css">
  34. #wb_Form1
  35. {
  36.    background-color: #FFFFFF;
  37.    border: 0px #000000 solid;
  38. }
  39. #wb_Text1
  40. {
  41.    background-color: transparent;
  42.    border: 0px #000000 solid;
  43.    padding: 0;
  44. }
  45. #wb_Text1 div
  46. {
  47.    text-align: left;
  48. }
  49. #wb_Text2
  50. {
  51.    background-color: transparent;
  52.    border: 0px #000000 solid;
  53.    padding: 0;
  54. }
  55. #wb_Text2 div
  56. {
  57.    text-align: left;
  58. }
  59. #rut
  60. {
  61.    border: 1px #C0C0C0 solid;
  62.    background-color: #FFFFFF;
  63.    color :#000000;
  64.    font-family: Arial;
  65.    font-size: 13px;
  66.    text-align: left;
  67.    vertical-align: middle;
  68. }
  69. #wb_Text3
  70. {
  71.    background-color: transparent;
  72.    border: 0px #000000 solid;
  73.    padding: 0;
  74. }
  75. #wb_Text3 div
  76. {
  77.    text-align: left;
  78. }
  79. #nombre
  80. {
  81.    border: 1px #C0C0C0 solid;
  82.    background-color: #FFFFFF;
  83.    color :#000000;
  84.    font-family: Arial;
  85.    font-size: 13px;
  86.    text-align: left;
  87.    vertical-align: middle;
  88. }
  89. #wb_Text4
  90. {
  91.    background-color: transparent;
  92.    border: 0px #000000 solid;
  93.    padding: 0;
  94. }
  95. #wb_Text4 div
  96. {
  97.    text-align: left;
  98. }
  99. #direc
  100. {
  101.    border: 1px #C0C0C0 solid;
  102.    background-color: #FFFFFF;
  103.    color :#000000;
  104.    font-family: Arial;
  105.    font-size: 13px;
  106.    text-align: left;
  107.    vertical-align: middle;
  108. }
  109. #wb_Text5
  110. {
  111.    background-color: transparent;
  112.    border: 0px #000000 solid;
  113.    padding: 0;
  114. }
  115. #wb_Text5 div
  116. {
  117.    text-align: left;
  118. }
  119. #fono
  120. {
  121.    border: 1px #C0C0C0 solid;
  122.    background-color: #FFFFFF;
  123.    color :#000000;
  124.    font-family: Arial;
  125.    font-size: 13px;
  126.    text-align: left;
  127.    vertical-align: middle;
  128. }
  129. #wb_Text6
  130. {
  131.    background-color: transparent;
  132.    border: 0px #000000 solid;
  133.    padding: 0;
  134. }
  135. #wb_Text6 div
  136. {
  137.    text-align: left;
  138. }
  139. #ncliente
  140. {
  141.    border: 1px #C0C0C0 solid;
  142.    background-color: #FFFFFF;
  143.    color :#000000;
  144.    font-family: Arial;
  145.    font-size: 13px;
  146.    text-align: left;
  147.    vertical-align: middle;
  148. }
  149. #wb_Text7
  150. {
  151.    background-color: transparent;
  152.    border: 0px #000000 solid;
  153.    padding: 0;
  154. }
  155. #wb_Text7 div
  156. {
  157.    text-align: left;
  158. }
  159. #ncotiza
  160. {
  161.    border: 1px #C0C0C0 solid;
  162.    background-color: #FFFFFF;
  163.    color :#000000;
  164.    font-family: Arial;
  165.    font-size: 13px;
  166.    text-align: left;
  167.    vertical-align: middle;
  168. }
  169. #Line1
  170. {
  171.    color: #00FF00;
  172.    background-color: #00FF00;
  173.    border-width: 0px;
  174. }
  175. #Line2
  176. {
  177.    color: #00FF00;
  178.    background-color: #00FF00;
  179.    border-width: 0px;
  180. }
  181. #Line3
  182. {
  183.    color: #00FF00;
  184.    background-color: #00FF00;
  185.    border-width: 0px;
  186. }
  187. #wb_Text8
  188. {
  189.    background-color: transparent;
  190.    border: 0px #000000 solid;
  191.    padding: 0;
  192. }
  193. #wb_Text8 div
  194. {
  195.    text-align: left;
  196. }
  197. #Table1
  198. {
  199.    border: 0px #C0C0C0 solid;
  200.    background-color: transparent;
  201.    border-spacing: 0px;
  202. }
  203. #Table1 td
  204. {
  205.    padding: 0px 0px 0px 0px;
  206. }
  207. #Table1 td div
  208. {
  209.    white-space: nowrap;
  210. }
  211. #Editbox7
  212. {
  213.    border: 1px #C0C0C0 solid;
  214.    background-color: #FFFFFF;
  215.    color :#000000;
  216.    font-family: Arial;
  217.    font-size: 13px;
  218.    text-align: left;
  219.    vertical-align: middle;
  220. }
  221. #Editbox9
  222. {
  223.    border: 1px #C0C0C0 solid;
  224.    background-color: #FFFFFF;
  225.    color :#000000;
  226.    font-family: Arial;
  227.    font-size: 13px;
  228.    text-align: left;
  229.    vertical-align: middle;
  230. }
  231. #Editbox10
  232. {
  233.    border: 1px #C0C0C0 solid;
  234.    background-color: #FFFFFF;
  235.    color :#000000;
  236.    font-family: Arial;
  237.    font-size: 13px;
  238.    text-align: left;
  239.    vertical-align: middle;
  240. }
  241. #Editbox11
  242. {
  243.    border: 1px #C0C0C0 solid;
  244.    background-color: #FFFFFF;
  245.    color :#000000;
  246.    font-family: Arial;
  247.    font-size: 13px;
  248.    text-align: left;
  249.    vertical-align: middle;
  250. }
  251. #Line4
  252. {
  253.    color: #00FF00;
  254.    background-color: #00FF00;
  255.    border-width: 0px;
  256. }
  257. #Combobox1
  258. {
  259.    border: 1px #C0C0C0 solid;
  260.    background-color: #FFFFFF;
  261.    color: #000000;
  262.    font-family: Arial;
  263.    font-size: 13px;
  264. }
  265. #wb_Text9
  266. {
  267.    background-color: transparent;
  268.    border: 0px #000000 solid;
  269.    padding: 0;
  270. }
  271. #wb_Text9 div
  272. {
  273.    text-align: left;
  274. }
  275. #moneda
  276. {
  277.    border: 1px #C0C0C0 solid;
  278.    background-color: #FFFFFF;
  279.    color: #000000;
  280.    font-family: Arial;
  281.    font-size: 13px;
  282. }
  283. #Line6
  284. {
  285.    color: #00FF00;
  286.    background-color: #00FF00;
  287.    border-width: 0px;
  288. }
  289. #Line7
  290. {
  291.    color: #00FF00;
  292.    background-color: #00FF00;
  293.    border-width: 0px;
  294. }
  295. #wb_Text10
  296. {
  297.    background-color: transparent;
  298.    border: 0px #000000 solid;
  299.    padding: 0;
  300. }
  301. #wb_Text10 div
  302. {
  303.    text-align: left;
  304. }
  305. </style>
  306. </head>
  307. <body>
  308. <div id="wb_Form1" style="position:absolute;left:29px;top:27px;width:929px;height:231px;z-index:18;">
  309. <form name="Form_emp" method="post" action="" enctype="text/plain" id="Form1">
  310. <div id="wb_Text1" style="position:absolute;left:0px;top:13px;width:163px;height:16px;z-index:0;">
  311. <span style="color:#009300;font-family:Arial;font-size:13px;"><strong>Datos de la Empresa</strong></span></div>
  312. <div id="wb_Text2" style="position:absolute;left:70px;top:60px;width:92px;height:16px;z-index:1;">
  313. <span style="color:#666666;font-family:Arial;font-size:13px;">Rut :</span></div>
  314. <input type="text" id="rut" style="position:absolute;left:172px;top:60px;width:97px;height:23px;line-height:23px;z-index:2;" name="Editbox1" value="">
  315. <div id="wb_Text3" style="position:absolute;left:70px;top:90px;width:92px;height:16px;z-index:3;">
  316. <span style="color:#666666;font-family:Arial;font-size:13px;">Nombre :</span></div>
  317. <input type="text" id="nombre" style="position:absolute;left:172px;top:90px;width:290px;height:23px;line-height:23px;z-index:4;" name="Editbox2" value="">
  318. <div id="wb_Text4" style="position:absolute;left:70px;top:120px;width:92px;height:16px;z-index:5;">
  319. <span style="color:#666666;font-family:Arial;font-size:13px;">Dirección :</span></div>
  320. <input type="text" id="direc" style="position:absolute;left:172px;top:120px;width:290px;height:23px;line-height:23px;z-index:6;" name="Editbox3" value="">
  321. <div id="wb_Text5" style="position:absolute;left:70px;top:150px;width:92px;height:16px;z-index:7;">
  322. <span style="color:#666666;font-family:Arial;font-size:13px;">Teléfono :</span></div>
  323. <input type="text" id="fono" style="position:absolute;left:172px;top:150px;width:116px;height:23px;line-height:23px;z-index:8;" name="Editbox4" value="">
  324. <div id="wb_Text6" style="position:absolute;left:530px;top:60px;width:92px;height:16px;z-index:9;">
  325. <span style="color:#666666;font-family:Arial;font-size:13px;">Nº Cliente :</span></div>
  326. <input type="text" id="ncliente" style="position:absolute;left:632px;top:60px;width:101px;height:23px;line-height:23px;z-index:10;" name="Editbox5" value="">
  327. <div id="wb_Text7" style="position:absolute;left:530px;top:90px;width:92px;height:16px;z-index:11;">
  328. <span style="color:#666666;font-family:Arial;font-size:13px;">Nº Cotización :</span></div>
  329. <input type="text" id="ncotiza" style="position:absolute;left:632px;top:90px;width:102px;height:23px;line-height:23px;z-index:12;" name="Editbox6" value="">
  330. <hr id="Line2" style="margin:0;padding:0;position:absolute;left:0px;top:39px;width:928px;height:1px;z-index:13;">
  331. <button id="buscar_rut" type="button" name="" value="" style="position:absolute;left:287px;top:60px;width:70px;height:27px;z-index:14;"><div style="text-align:center"><span style="color:#000000;font-family:Arial;font-size:13px">Buscar</span></div></button>
  332. <div id="wb_Text8" style="position:absolute;left:0px;top:209px;width:273px;height:16px;z-index:15;">
  333. <span style="color:#009300;font-family:Arial;font-size:13px;"><strong>Caracteristicas Elétricas Generales :</strong></span></div>
  334. <div id="wb_Text9" style="position:absolute;left:530px;top:119px;width:92px;height:16px;z-index:16;">
  335. <span style="color:#666666;font-family:Arial;font-size:13px;">Moneda :</span></div>
  336. <select name="Combobox2" size="1" id="moneda" style="position:absolute;left:632px;top:120px;width:104px;height:25px;z-index:17;">
  337. </select>
  338. </form>
  339. </div>
  340. <hr id="Line1" style="margin:0;padding:0;position:absolute;left:29px;top:228px;width:930px;height:1px;z-index:19;">
  341. <hr id="Line3" style="margin:0;padding:0;position:absolute;left:29px;top:261px;width:929px;height:1px;z-index:20;">
  342. <button id="ag_ceg" type="button" name="" value="" style="position:absolute;left:316px;top:231px;width:70px;height:27px;z-index:21;"><div style="text-align:center"><span style="color:#000000;font-family:Arial;font-size:13px">Agregar</span></div></button>
  343. <table style="position:absolute;left:29px;top:272px;width:930px;height:120px;z-index:22;" cellpadding="0" cellspacing="0" id="Table1">
  344. <tr>
  345. <td style="background-color:transparent;text-align:left;vertical-align:top;width:81px;height:24px;">
  346. <div><span style="color:#666666;font-family:Arial;font-size:13px;"><strong>Ref.</strong></span></div>
  347. </td>
  348. <td style="background-color:transparent;text-align:left;vertical-align:top;width:387px;height:24px;">
  349. <div><span style="color:#666666;font-family:Arial;font-size:13px;"><strong>&nbsp;&nbsp; Descripción</strong></span></div>
  350. </td>
  351. <td style="background-color:transparent;text-align:center;vertical-align:top;width:125px;height:24px;">
  352. <div><span style="color:#666666;font-family:Arial;font-size:13px;"><strong>Opcional</strong></span></div>
  353. </td>
  354. <td style="background-color:transparent;text-align:center;vertical-align:top;width:95px;height:24px;">
  355. <div><span style="color:#666666;font-family:Arial;font-size:13px;"><strong> QTY</strong></span></div>
  356. </td>
  357. <td style="background-color:transparent;text-align:center;vertical-align:top;width:115px;height:24px;">
  358. <div><span style="color:#666666;font-family:Arial;font-size:13px;"><strong> Unidad</strong></span></div>
  359. </td>
  360. <td style="background-color:transparent;text-align:center;vertical-align:top;height:24px;">
  361. <div><span style="color:#666666;font-family:Arial;font-size:13px;"><strong> Total</strong></span></div>
  362. </td>
  363. </tr>
  364. <tr>
  365. <td style="background-color:transparent;text-align:left;vertical-align:top;width:81px;height:24px;">&nbsp;
  366. </td>
  367. <td style="background-color:transparent;text-align:left;vertical-align:top;width:387px;height:24px;">&nbsp;
  368. </td>
  369. <td style="background-color:transparent;text-align:left;vertical-align:top;width:125px;height:24px;">&nbsp;
  370. </td>
  371. <td style="background-color:transparent;text-align:left;vertical-align:top;width:95px;height:24px;">&nbsp;
  372. </td>
  373. <td style="background-color:transparent;text-align:left;vertical-align:top;width:115px;height:24px;">&nbsp;
  374. </td>
  375. <td style="background-color:transparent;text-align:left;vertical-align:top;height:24px;">&nbsp;
  376. </td>
  377. </tr>
  378. <tr>
  379. <td style="background-color:transparent;text-align:left;vertical-align:top;width:81px;height:24px;">&nbsp;
  380. </td>
  381. <td style="background-color:transparent;text-align:left;vertical-align:top;width:387px;height:24px;">&nbsp;
  382. </td>
  383. <td style="background-color:transparent;text-align:left;vertical-align:top;width:125px;height:24px;">&nbsp;
  384. </td>
  385. <td style="background-color:transparent;text-align:left;vertical-align:top;width:95px;height:24px;">&nbsp;
  386. </td>
  387. <td style="background-color:transparent;text-align:left;vertical-align:top;width:115px;height:24px;">&nbsp;
  388. </td>
  389. <td style="background-color:transparent;text-align:left;vertical-align:top;height:24px;">&nbsp;
  390. </td>
  391. </tr>
  392. <tr>
  393. <td style="background-color:transparent;text-align:left;vertical-align:top;width:81px;height:24px;">&nbsp;
  394. </td>
  395. <td style="background-color:transparent;text-align:left;vertical-align:top;width:387px;height:24px;">&nbsp;
  396. </td>
  397. <td style="background-color:transparent;text-align:left;vertical-align:top;width:125px;height:24px;">&nbsp;
  398. </td>
  399. <td style="background-color:transparent;text-align:left;vertical-align:top;width:95px;height:24px;">&nbsp;
  400. </td>
  401. <td style="background-color:transparent;text-align:left;vertical-align:top;width:115px;height:24px;">&nbsp;
  402. </td>
  403. <td style="background-color:transparent;text-align:left;vertical-align:top;height:24px;">&nbsp;
  404. </td>
  405. </tr>
  406. <tr>
  407. <td style="background-color:transparent;text-align:left;vertical-align:top;width:81px;height:24px;">&nbsp;
  408. </td>
  409. <td style="background-color:transparent;text-align:left;vertical-align:top;width:387px;height:24px;">&nbsp;
  410. </td>
  411. <td style="background-color:transparent;text-align:left;vertical-align:top;width:125px;height:24px;">&nbsp;
  412. </td>
  413. <td style="background-color:transparent;text-align:center;vertical-align:top;width:95px;height:24px;">
  414. <div><span style="color:#009300;font-family:Arial;font-size:13px;"><strong>Moneda</strong></span></div>
  415. </td>
  416. <td style="background-color:transparent;text-align:center;vertical-align:top;width:115px;height:24px;">
  417. <div><span style="color:#009300;font-family:Arial;font-size:13px;"><strong>US</strong></span></div>
  418. </td>
  419. <td style="background-color:transparent;text-align:left;vertical-align:top;height:24px;">
  420. <div><span style="color:#009300;font-family:Arial;font-size:13px;"><strong>&nbsp;&nbsp;&nbsp; $</strong></span></div>
  421. </td>
  422. </tr>
  423. </table>
  424. <input type="text" id="Editbox7" style="position:absolute;left:29px;top:298px;width:67px;height:18px;line-height:18px;z-index:23;" name="Editbox7" value="">
  425. <input type="text" id="Editbox9" style="position:absolute;left:630px;top:298px;width:86px;height:18px;line-height:18px;z-index:24;" name="Editbox7" value="">
  426. <input type="text" id="Editbox10" style="position:absolute;left:735px;top:298px;width:86px;height:18px;line-height:18px;z-index:25;" name="Editbox7" value="">
  427. <input type="text" id="Editbox11" style="position:absolute;left:854px;top:298px;width:86px;height:18px;line-height:18px;z-index:26;" name="Editbox7" value="">
  428. <hr id="Line4" style="margin:0;padding:0;position:absolute;left:29px;top:362px;width:930px;height:1px;z-index:27;">
  429. <select name="Combobox1" size="1" id="Combobox1" style="position:absolute;left:121px;top:298px;width:372px;height:21px;z-index:28;">
  430. </select>
  431. <input type="checkbox" id="Checkbox1" name="" value="on" style="position:absolute;left:556px;top:298px;z-index:29;">
  432. <hr id="Line6" style="margin:0;padding:0;position:absolute;left:30px;top:395px;width:930px;height:1px;z-index:30;">
  433. <hr id="Line7" style="margin:0;padding:0;position:absolute;left:30px;top:428px;width:929px;height:1px;z-index:31;">
  434. <button id="ag_sor" type="button" name="" value="" style="position:absolute;left:317px;top:398px;width:70px;height:27px;z-index:32;"><div style="text-align:center"><span style="color:#000000;font-family:Arial;font-size:13px">Agregar</span></div></button>
  435. <div id="wb_Text10" style="position:absolute;left:29px;top:404px;width:298px;height:16px;z-index:33;">
  436. <span style="color:#009300;font-family:Arial;font-size:13px;"><strong>Selección de Observaciones y Restricciones :</strong></span></div>
  437. <button id="guardar" type="button" name="" value="" style="position:absolute;left:887px;top:447px;width:70px;height:27px;z-index:34;"><div style="text-align:center"><span style="color:#000000;font-family:Arial;font-size:13px">Guardar</span></div></button>
  438. </body>
  439. </html>
Coloreado en 0.011 segundos, usando GeSHi 1.0.8.4


El archivo Perl no sé cómo hacerlo... De antemano, gracias.
tolyn
Perlero nuevo
Perlero nuevo
 
Mensajes: 14
Registrado: 2011-10-19 08:20 @389

Publicidad

Re: Pasar formulario HTML a Perl

Notapor explorer » 2012-09-07 08:01 @376

Bienvenido a los foros de Perl en Español, tolyn.

En la sección Tutoriales (menú superior) tienes acceso a cómo hacer las consultas MySQL y cómo hacer el CGI en Perl para leer los datos del formulario.
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14480
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España


Volver a Básico

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 21 invitados

cron