Que lindo eres pidiendonos que te hagamos la tarea
![:xD :xD](https://forum.elhacker.net/Smileys/navidad/xd.gif)
![:-* :-*](https://forum.elhacker.net/Smileys/navidad/kiss.gif)
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú<?
$link = mysql_connect("host","user","pass") or die(mysql_error());
mysql_select_db("usuarios",$link) or die(mysql_error());
$sql = mysql_query("SELECT * FROM usuarios");
if(mysql_num_rows($sql)< 0){
if(!$_COOKIE['usuario']){
echo '<form method=post action="">';
echo '<input type=text name=nombre /><br />';
echo '<input type=text name=apellido /><br />';
echo '<input type=text name=edad><br />';
echo '<input type=submit name=guardar value=guardar>';
echo '</form>';
}else{
$sql = mysql_query("SELECT * FROM usuarios");
$row=mysql_fetch_array($sql);
echo '<form method=post action="">';
echo '<input type=text name=nombre value='.$row['nombre'].' /><br />';
echo '<input type=text name=apellido value='.$row['apellido'].' /><br />';
echo '<input type=text name=edad value='.$row['edad'].' /><br />';
echo '<input type=submit name=guardar value=guardar>';
echo '</form>';
}
if($_POST['guardar']){
$sql = "UPDATE TABLE usuarios SET nombre='".$_POST['nombre']."'", apellido='".$_POST['apellido']."'", edad='".$_POST['edad']."')";
mysql_query($sql);
echo "Se guardo con exito!"
}
?>
<?
$link = mysql_connect("host","user","pass") or die(mysql_error());
mysql_select_db("usuarios",$link) or die(mysql_error());
if(!$_COOKIE['usuario']){
echo '<form method=post action="">';
echo '<input type=text name=nombre /><br />';
echo '<input type=text name=apellido /><br />';
echo '<input type=text name=edad><br />';
echo '<input type=submit name=guardar value=guardar>';
echo '</form>';
}else{
$sql = mysql_query("SELECT * FROM usuarios WHERE nombre='".$_COOKIE['usuario']."'");
$row=mysql_fetch_array($sql);
echo "Nombre: ".$row['nombre'];
echo "<br />";
echo "apellido: ".$row['apellido'];
echo "<br />";
echo "edad: ".$row['edad'];
}
if($_POST['guardar']){
$sql = "INSERT INTO usuarios(nombre,apellido,edad) VALUES('".$_POST['nombre']."','".$_POST['apellido']."','".$_POST['edad']."')";
mysql_query($sql);
setcookie("usuario",$_POST['nombre'],time()+3600);
echo "Se guardo con exito!"
}
?>
[php]EL CODIGO AQUI[/php]
<?
function bbcode_php($str){
$color = substr($str,5,-6);
$show = highlight_string($color);
}
echo bbcode_php('[php]<? echo "hola"; ?>[/php]');
?>
[url=urldeljugador]nombre_del_jugador[/url]
$string='soy el <nombre_del_jugador> y deseo retarte a duelo';
$buscar='<(.*)>';
$reemplazar='[url=urldeljugador]\1[/url]';
echo ereg_replace($buscar,$reemplazar,$string);