Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/03/2010, 09:40
oOPuckyOo
 
Fecha de Ingreso: marzo-2010
Mensajes: 6
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: Ayudame a crear una aplicación php...!

PEro lo curioso esque no agrega datos cuando voy a verificar al SQL no agrega datos quisiera saber que estoy haciendo mal

Agregar datos...!

Cita:
<form method="POST" action="botregister.php">
<p>AccountID: <input type="text" name="AccountID" size="20"></p>
<p>Nombre del Botpet : <input type="text" name="Name" size="20"></p>
<p>Level 1: <input type="text" name="cLevel" size="20"></p>
<p><input type="button" value="Botón" name="Send"></p>
</form>
botregister.php

Cita:
<?
include('../config.php');
if(($_POST[AccountID] == ' ') or ($_POST[Name] == ' ') or ($_POST[cLevel] == ' ') )
{
echo("<script>");
echo("alert(Faltan campos por rellenar)");
echo("</script>");
}else{
$usuarios=mysql_query("SELECT AccountID FROM BotPet WHERE AccountID='$POST_[AccountID]' ");
if($user_ok=mysql_fetch_array($usuarios))
{
echo("datos cambiados");
}else{
mysql_query("INSERT INTO BotPet (AccountID,Name,cLevel,) values ('$user','$Name','$cLevel') ");
echo("los datos fueron agregados");
}
}
?>

config.php

Cita:
<?
$server="localhost";
$db="usuarios";
$user="master";
$pass="123456";
mysql_connect("$server","$user","$pass");
mysql_select_db("$db");
session_start()
?>

Última edición por oOPuckyOo; 25/03/2010 a las 10:03