PHP - Undefined variable: editFormAction

 
Vista:

Undefined variable: editFormAction

Publicado por nicolas (4 intervenciones) el 13/06/2016 15:36:50
buenas necesito ayuda tengo este codigo
<form action="<?php echo $editFormAction;?>" method="POST" name="form1" id="form1">

y a la hora de ejecutar el local host me sale esto y no encuentro el problema

Notice: Undefined variable: editFormAction in C:\wamp\www\labapa\_admin\Slider_edit.php on line 78 Call Stack #TimeMemoryFunctionLocation 10.0012153032{main}( )..\Slider_edit.php:0 " method="GET" name="form1" id="form1">

paso el codigo completo a continuacion

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

$theValue = function_exists("mysqli_real_escape_string") ? mysqli_real_escape_string($conexionlabapa, $theValue) : mysqli_escape_string($conexionlabapa, $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;
}
}
$varDato_DatosSlider="0";
if(isset($_GET["recordid"])){
$varDato_DatosSlider=$_GET["recordid"];
}
mysqli_select_db($conexionlabapa, $database_conexionlabapa);
$query_DatosSlider = sprintf("SELECT * FROM tblslider WHERE tblslider.idContador=%s", GETSQLValueString($varDato_DatosSlider,"int"));
$DatosSlider = mysqli_query($conexionlabapa, $query_DatosSlider) or die(mysqli_error());
$row_DatosSlider = mysqli_fetch_assoc($DatosSlider);
$totalRows_DatosSlider = mysqli_num_rows($DatosSlider);
?>
<!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"><!-- InstanceBegin template="/Templates/plantillaadmin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Administraci&oacute;n Laboratorio APA</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link href="../css/estiloadmin.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div class="container">
<div class="header">
<?php include("../includes/cabecera_admin.php"); ?>
</div>
<div class="sidebar1">
<?php include("../includes/menuizquierda_admin.php"); ?>

<!-- end .sidebar1 --></div>
<div class="content"><!-- InstanceBeginEditable name="Partederechaadmin" -->

<script>
function subirimagen(nombrecampo)
{
self.name="opener";
remote=open('gestionimagen.php?campo='+nombrecampo,'remote','width=400,height=150,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes');
remote.focus();
}
</script>
<h1>Editar Datos</h1>
<p>&nbsp;</p>
<form action="<?php echo $editFormAction;?>" method="POST" name="form1" id="form1">
<table width="491" align="center">
<tr valign="baseline">
<td width="159" align="right" nowrap="nowrap">Imagen Grande :</td>

<td width="265"><input type="text" name="strimagengrande" value="<?php echo htmlentities($row_DatosSlider['strimagengrande'],ENT_COMPAT,'iso-8859-1');?>" size="20" /><input type="button" name="button" id="button" value="Subir Imagen" onclick="javascript:subirimagen('strimagengrande');"/>(738x250px)</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Imagen Peque&ntilde;a :</td>
<td><input type="text" name="strimagenpequena" value="<?php echo htmlentities($row_DatosSlider['strimagenpequena'],ENT_COMPAT,'iso-8859-1');?>" size="20" /><input type="button" name="button2" id="button2" value="Subir Imagen" onclick="javascript:subirimagen('strimagenpequena');"/>(80x50px)</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Titulo:</td>
<td><input type="text" name="strtitulo" value="<?php echo htmlentities($row_DatosSlider['strtitulo'],ENT_COMPAT,'iso-8859-1');?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Subtitulo:</td>
<td><input type="text" name="strsubtitulo" value="<?php echo htmlentities($row_DatosSlider['strsubtitulo'],ENT_COMPAT,'iso-8859-1');?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Menu:</td>
<td><input type="text" name="strmenu" value="<?php echo htmlentities($row_DatosSlider['strmenu'],ENT_COMPAT,'iso-8859-1');?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Link:</td>
<td><input type="text" name="strlink" value="<?php echo htmlentities($row_DatosSlider['strlink'],ENT_COMPAT,'iso-8859-1');?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Orden:</td>
<td><input type="text" name="intOrden" value="<?php echo htmlentities($row_DatosSlider['strOrden'],ENT_COMPAT,'iso-8859-1');?>" size="5" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Estado:</td>
<td><Select name="intEstado">
<option Value="1"<?php if(!(strcmp(1,htmlentities($row_DatosSlider['intEntado'],ENT_COMPAT, 'iso-8859-1')))){echo "SELECTED";}?>>Activo</option>
<option Value="0"<?php if(!(strcmp(0,htmlentities($row_DatosSlider['intEntado'],ENT_COMPAT, 'iso-8859-1')))){echo "SELECTED";}?>>Desactivado</option>
</Select></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">&nbsp;</td>
<td><input type="submit" value="Actualizar Registro" /></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
<input type="hidden" name="idcontador" value="<?php echo $row_DatosSlider['idcontador'];?>"/>
</form>
<p>&nbsp;</p>

<!-- InstanceEndEditable --> <!-- end .content --></div>
<div class="footer">
<?php include("../includes/pie_admin.php"); ?>
<p>&nbsp;</p>
<!-- end .footer --></div>
<!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>
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
Imágen de perfil de Pierre

Undefined variable: editFormAction

Publicado por Pierre (9 intervenciones) el 13/06/2016 15:57:59
¿Y dónde defines $editFormAction?

Sola no se define la variable...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Undefined variable: editFormAction

Publicado por Nicolas (4 intervenciones) el 14/06/2016 12:01:36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$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 tblslider (strimagengrande, strimagenpequena, strtitulo, strsubtitulo, strmenu, strlink, intOrden, IntEstado) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
	GetSQLValueString($_POST['strimagengrande'], "text"),
	GetSQLValueString($_POST['strimagenpequena'], "text"),
	GetSQLValueString($_POST['strtitulo'], "text"),
	GetSQLValueString($_POST['strsubtitulo'], "text"),
	GetSQLValueString($_POST['strmenu'], "text"),
	GetSQLValueString($_POST['strlink'], "text"),
	GetSQLValueString($_POST['intOrden'], "int"),
	GetSQLValueString($_POST['IntEstado'], "int"));
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar