Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/06/2009, 14:55
alexitech
 
Fecha de Ingreso: junio-2009
Mensajes: 51
Antigüedad: 15 años, 7 meses
Puntos: 1
problema con <?php $row['id']?>

que tal, tengo este problema:

el <?php $row['id']?> no me esta "jalando" el valor de la BD.

Tengo un Formulario con un action de la siguiente manera.

Código PHP:
<form name="agregar" method="POST" action="?x=funciones&go=editar&id=<?php $row['id']?>">
el codigo de funciones.php es

Código PHP:
if($go=="editar"){
$sql "UPDATE datos set nombre='$nombre', url='$url', target='$target' where id='$id'";
$res mysql_query($sql);
echo 
"<SCRIPT LANGUAGE=\"javascript\">location.href = \"index.php?x=menu\";</SCRIPT>";

En la pagina del formulario tengo:
Código PHP:
<?php

error_reporting
(E_ALL);
session_start();
if(!isset(
$_SESSION['user']) && !isset($_SESSION['pass'])){
session_destroy();
header("location:login.php");
} else {
$query mysql_query("SELECT * FROM datos where id='$id'");
while(
$row mysql_fetch_array($query)){
?>
El problema es que
Código PHP:
<?php $row['id']?>
no me jala el valor de la BD y al momento de que el formulario hace el action lo hace a index.php?x=funciones&go=editar&id= -> NO TIENE el id.

la verdad no se porque pasa esto..... ayuda xD