Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/12/2006, 11:21
Avatar de hulray
hulray
 
Fecha de Ingreso: septiembre-2006
Mensajes: 630
Antigüedad: 18 años, 6 meses
Puntos: 3
Pregunta Problema al mostrar el id

Necesito mostrar el id, en una cotizacion.

Con este codigo que les mostrare lo muestra, pero al presionar F5 pasa al siguiente id, dejandome el anterior con los datos en blanco.

Código PHP:
<?php
$link 
mysql_connect('localhost','user','pass');
if (!
$link) {
die(
'Could not connect: ' mysql_error());
}
mysql_select_db('db');

$resultu mysql_query("insert into cliente (id) values('NULL')" mysql_error()); 
$Uid mysql_insert_id(); //AQUI TOMAS EL ULTIMO ID INSERTADO 

echo "$Uid"//AQUI LO MUESTRAS EN PANTALLA 

?>
Por favor, si me pueden ayudar, se los agradecere...