Ver Mensaje Individual
  #7 (permalink)  
Antiguo 06/03/2011, 07:46
Snoopy1413
 
Fecha de Ingreso: febrero-2011
Mensajes: 55
Antigüedad: 14 años, 2 meses
Puntos: 4
Respuesta: Necesito ayuda con PHP

Cita:
Iniciado por ir3al Ver Mensaje
Si por ejemplo en el PHP A almacenas en un text un valor y lo envias mediante submit en el formulario, en el PHP B tienes que hacer lo que te he dicho. $_POST['variable'] y asi obtendras el valor de la variable del PHP A.

Si mira esq yo llamo a un php dentro de otro... pero como dices yo hago el $_POST['Variable'], pero en el php B me sale un error q dice ERROR UNDIFINE $_POST['Variable'].

#Este es el php A
<?php

$Users = $_POST["User"];
$SubName = $_POST["Adress"];
$Fono = $_POST["Tlf"];


$Host = "localhost";
$Usuario = "root";
$Password = "";
$db = "Agenda";
$SQL_Consulta = "SELECT * FROM clientes WHERE nombre like '$Users'";
/*$SQL_Crear_Fila = "INSERT into Clientes value('$Users','$SubName','$Fono')";*/

$Conectar = mysql_connect ($Host, $Usuario, $Password);
$Con_db = mysql_select_db ($db, $Conectar);

$Consulta = mysql_query($SQL_Consulta, $Conectar) or die("ERROR CONSULTA");

/*BUCLE QUE DEVUELVE EL LISTADO DE UN RESULTADO DE SQL*/
while($row = mysql_fetch_array($Consulta))
{
echo "<br><br>";
echo "<br>"."Nombre: ".$row['Nombre']."<br>";
echo "Apellido: ".$row['Apellido']."<br>";
echo "Telefono: ".$row['TELEFONO']."<br>";
echo "<br><form method='POST' ACTION='PHP_B.php'>"; #AQUI LLAMO A PHP B
echo "<input type='submit' value='Modificar' action=''Name='Mod'></form>";
echo "<input type='submit' value='Borrar' Name='Erase'>";
echo "</form>";
break;
}

?>

En realidad lo que estoy haciendo es una agenda pero solo me falta lo de modificar y borrar, la agenda consiste en CONSULTAR DATOS Y LUEGO QUE APARESCAN 2 OPCIONES QUE SON MODIFICAR Y BORRAR... Y ESO NO MAS ME FALTA Y NO SE COMO LEER LOS DATOS DEL PHP A

GRACIAS POR LA AYUDA...

Última edición por Snoopy1413; 06/03/2011 a las 10:48