Dreamweaver - No envia Formularios

 
Vista:

No envia Formularios

Publicado por carlos (3 intervenciones) el 14/07/2009 21:11:14
EL que sabe....sabe...

no veo el error en el envio del formulario (no me guarda los registros en la base de datos en MySQL)...agradezco de antemano su ayuda...este es el codigo de el formulario q no sirve:

<?php require_once('Connections/MiConex.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO taller (codigo, actividad, nombre, responsable, horas_academicas, lugar, dirigido_a, fecha_inicio, fecha_termino) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['codigo'], "text"),
GetSQLValueString($_POST['actividad'], "text"),
GetSQLValueString($_POST['nombre'], "text"),
GetSQLValueString($_POST['responsable'], "text"),
GetSQLValueString($_POST['horas_academicas'], "int"),
GetSQLValueString($_POST['lugar'], "text"),
GetSQLValueString($_POST['dirigido_a'], "text"),
GetSQLValueString($_POST['fecha_inicio'], "date"),
GetSQLValueString($_POST['fecha_termino'], "date"));

mysql_select_db($database_MiConex, $MiConex);
$Result1 = mysql_query($insertSQL, $MiConex) or die(mysql_error());
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es" dir="ltr">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?token=91d868f770c15fc6bb9306c5b2799ba2&js_frame=right&nocache=1247081705" />
<link rel="stylesheet" type="text/css" href="./css/print.css?token=91d868f770c15fc6bb9306c5b2799ba2" media="print" />
<script type="text/javascript" language="JavaScript">
// <![CDATA[
// Updates the title of the frameset if possible (ns4 does not allow this)
if (typeof(parent.document) != 'undefined' && typeof(parent.document) != 'unknown'
&& typeof(parent.document.title) == 'string') {
parent.document.title = 'localhost / localhost / educacion / taller | phpMyAdmin 2.10.1';
}

// js form validation stuff
var errorMsg0 = '¡Falta un valor en el formulario!';
var errorMsg1 = '¡Ésto no es un número!';
var noDropDbMsg = '';
var confirmMsg = 'Realmente desea ';
var confirmMsgDropDB = '¡Está a punto de DESTRUIR una base de datos completa!';
// ]]>
</script>
<script src="./js/functions.js" type="text/javascript" language="JavaScript"></script>

<script src="./js/tooltip.js" type="text/javascript"
language="JavaScript"></script>
<meta name="OBGZip" content="false" />
<!--[if IE 6]>
<style type="text/css">
/* <![CDATA[ */
html {
overflow-y: scroll;
}
/* ]]> */
</style>
<![endif]-->
<style type="text/css">
<!--
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder