<? function db_connect() { $conexion = mysql_connect("localhost","root",""); mysql_select_db('tienda',$conexion); } ?>