Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Temas - kalash

Páginas: [1]
1
PHP / AYUDA - Funcion no imprime datos
« en: 25 de Marzo de 2008, 15:25:56 pm »
Saludos debo hacer esto
se trata de una ficha de productos donde deben aparecerme los productos de la siguient manera

Categoria de los productos
Subcategoria
Linea de prod.
Producto1
Producto2

y tods los mencionados en esa rama....

Ahora bien... Relaciono en la tabla Subcategoria el id_cat con el id de la tabla categoria
Relaciono en la tabla Linea id_sub con el id de la tabla subcategoria

y asi deberia de hacer con productos donde el id_lin deba ser = al id de la tabla linea..

pero la declaracion de linea no me imprime hace esto

deberia imprimir asi

Categoria
SubCategoria
Linea

y solo imprime
Categoria
SubCategoria
en les dejo mi codigo

<?php require_once(&#39;Connections/flamuko.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_flamuko$flamuko);
$query_Recordset1 "SELECT * FROM categoria";
$Recordset1 mysql_query($query_Recordset1$flamuko) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);
?>
<link href="css/estilos.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a {
	
font-family: Verdana, Arial, Helvetica, sans-serif;
}
a:link {
	
text-decoration: none;
}
a:visited {
	
text-decoration: none;
}
a:hover {
	
text-decoration: underline;
}
a:active {
	
text-decoration: none;
}
body {
	
margin-left: 12px;
}
-->
</style>

  <p class="tituloPROD">&nbsp;</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="5%">&nbsp;</td>
      <td colspan="2" class="tituloPROD"><?php 

	
  
	
  echo 
$row_Recordset1[&#39;nombre&#39;]; ?>        </td>
    </tr>
   <?php mysql_select_db($database_flamuko$flamuko);
	
	
$query_Recordset2 "SELECT * FROM subcategoria WHERE id_cat =".$row_Recordset1[&#39;id&#39;];
	
	
$Recordset2 mysql_query($query_Recordset2$flamuko) or die(mysql_error());
	
	

	
	
$totalRows_Recordset2 mysql_num_rows($Recordset2);
	
	

	
	
while(
$prod=mysql_fetch_assoc($Recordset2)){?>

        
	
	
<tr>
            <td>&nbsp;</td>
            <td width="8%">&nbsp;</td>
          <td width="87%" colspan="2" class="descPROD">
	
	
<?php echo $prod[&#39;nombre&#39;]; }?></td>    
    </tr>
      <?php mysql_select_db($database_flamuko$flamuko);
	
	
$query_Recordset3 "SELECT * FROM linea WHERE id_sub = &#39;$row_Recordset2[id]&#39;";
	
	
$Recordset3 mysql_query($query_Recordset3$flamuko) or die(mysql_error());
	
	

	
	
$totalRows_Recordset3 mysql_num_rows($Recordset3);
	
	

	
	
while(
$sub=mysql_fetch_array($Recordset3)){?>  
	
	
<tr>
	
	
  <td>&nbsp;</td>
	
	
  <td>&nbsp;</td>
	
	
  <td colspan="2" class="descPROD"><?php echo $sub[nombre]; }?></td>
	
    </tr>       
  </table>
 &nbsp;</td>
  </tr>

  <tr>
    <td scope="col">&nbsp;</td>
  </tr>
</table>
  

  <p class="tituloQUIENES">
    <?php
mysql_free_result
($Recordset1);
?>

2
PHP / SOS - Flash no se muestra en PHP
« en: 31 de Enero de 2008, 18:14:19 pm »
Saludos, estoy extrayendo el flash de la base de datos pero no se muestra... solo me sale
"no se cargo la pelicula"

aqui les dejo mi codigo a ver si encuentran el error :(

les agradeceria su ayuda por favor  :'(


<?php require_once(&#39;Connections/incomed.php&#39;); ?> 
<?php 
if (!function_exists("GetSQLValueString")) { 
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue "")  

  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); 

  switch (
$theType) { 
    case 
"text"
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL"
      break;     
    case 
"long"
    case 
"int"
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL"
      break; 
    case 
"double"
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL"
      break; 
    case 
"date"
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL"
      break; 
    case 
"defined"
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue
      break; 
  } 
  return 
$theValue


$colname_Recordset1 "-1"
if (isset(
$_GET[&#39;id&#39;])) { 
  
$colname_Recordset1 $_GET[&#39;id&#39;]; 

mysql_select_db($database_incomed$incomed); 
$query_Recordset1 sprintf("SELECT * FROM productos WHERE id = %s"GetSQLValueString($colname_Recordset1"int")); 
$Recordset1 mysql_query($query_Recordset1$incomed) or die(mysql_error()); 
$row_Recordset1 mysql_fetch_assoc($Recordset1); 
$totalRows_Recordset1 mysql_num_rows($Recordset1); 
?> 
<html> 
<head> 
<title>..// I N C O M E D //..</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<style type="text/css">td img {display: block;}body { 
    background-image: url(images/fondofondo.jpg); 

</style> 
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> 
<link href="css/estilos.css" rel="stylesheet" type="text/css" /> 
</head> 
<body bgcolor="#ffffff"> 
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0"> 
<!-- fwtable fwsrc="interno3.png" fwpage="ficha prod" fwbase="ficha_prod.gif" fwstyle="Dreamweaver" fwdocid = "365333443" fwnested="0" --> 
  <tr> 
   <td width="9"><img src="spacer.gif" width="9" height="1" border="0" alt="" /></td> 
   <td width="177"><img src="spacer.gif" width="177" height="1" border="0" alt="" /></td> 
   <td width="8"><img src="spacer.gif" width="8" height="1" border="0" alt="" /></td> 
   <td width="265"><img src="spacer.gif" width="265" height="1" border="0" alt="" /></td> 
   <td width="22"><img src="spacer.gif" width="21" height="1" border="0" alt="" /></td> 
   <td width="82"><img src="spacer.gif" width="80" height="1" border="0" alt="" /></td> 
   <td width="3"><img src="spacer.gif" width="3" height="1" border="0" alt="" /></td> 
   <td width="81"><img src="spacer.gif" width="79" height="1" border="0" alt="" /></td> 
   <td width="3"><img src="spacer.gif" width="3" height="1" border="0" alt="" /></td> 
   <td width="82"><img src="spacer.gif" width="80" height="1" border="0" alt="" /></td> 
   <td width="13"><img src="spacer.gif" width="13" height="1" border="0" alt="" /></td> 
   <td width="12"><img src="spacer.gif" width="12" height="1" border="0" alt="" /></td> 
   <td><img src="spacer.gif" width="10" height="1" border="0" alt="" /></td> 
   <td width="4"><img src="spacer.gif" width="1" height="1" border="0" alt="" /></td> 
  </tr> 

  <tr> 
   <td rowspan="15" bgcolor="#FFFFFF">&nbsp;</td> 
   <td colspan="11" rowspan="2" bgcolor="#FFFFFF"><img name="ficha_prod_r1_c3" src="http://www.forosdelweb.com/images/banner.jpg" width="741" height="152" border="0" id="ficha_prod_r1_c3" alt="" /></td> 
   <td width="12" rowspan="15" bgcolor="#FFFFFF">&nbsp;</td> 
   <td><img src="spacer.gif" width="1" height="41" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td><img src="spacer.gif" width="1" height="111" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td height="6" colspan="11" bgcolor="#FFFFFF"></td> 
   <td><img src="spacer.gif" width="1" height="6" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td rowspan="4" bgcolor="#FFFFFF"><img name="ficha_prod_r4_c3" src="http://www.forosdelweb.com/images/menu.jpg" width="177" height="208" border="0" id="ficha_prod_r4_c3" alt="" /></td> 
   <td rowspan="12" bgcolor="#FFFFFF">&nbsp;</td> 
   <td colspan="9" bgcolor="#FFFFFF"><img name="ficha_prod_r4_c5" src="http://www.forosdelweb.com/images/titulo_prod.gif" width="556" height="56" border="0" id="ficha_prod_r4_c5" alt="" /></td> 
   <td><img src="spacer.gif" width="1" height="56" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td height="6" colspan="9" bgcolor="#FFFFFF"></td> 
   <td><img src="spacer.gif" width="1" height="6" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td height="17" colspan="9" bgcolor="ffffff">&nbsp;</td> 
   <td><img src="spacer.gif" width="1" height="17" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td width="256" rowspan="9" valign="top" bgcolor="ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
       <td width="3%" class="tituloINDEX">&nbsp;</td> 
       <td width="97%" class="tituloINDEX"><?php echo $row_Recordset1[&#39;titulo&#39;]; ?></td> 
     </tr> 
     <tr> 
       <td colspan="2">&nbsp;</td> 
     </tr> 
     <tr> 
       <td colspan="2" class="textoINDEX"><div align="justify"><?php echo $row_Recordset1[&#39;comen&#39;]; ?></div></td> 
     </tr> 
   </table></td> 
   <td colspan="8" rowspan="3" align="center" valign="top" bgcolor="#D8D8CC"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
       <td></td> 
     </tr> 
   </table> 
/***************************************************\     
<script src="DWConfiguration/ActiveContent/IncludeFiles/AC_RunActiveContent.js" type="text/javascript"></script> 
<script type="text/javascript"> 
AC_FL_RunContent( &#39;codebase&#39;,&#39;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0&#39;,&#39;width&#39;,&#39;282&#39;,&#39;height&#39;,&#39;226&#39;,&#39;src&#39;,&#39;flash/<?php echo $row_Recordset1[&#39;flash&#39;]; ?>&#39;,&#39;quality&#39;,&#39;high&#39;,&#39;pluginspage&#39;,&#39;http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&#39;,&#39;movie&#39;,&#39;flash/<?php echo $row_Recordset1[&#39;flash&#39;]; ?>&#39; ); //end AC code 
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="300" height="237"> 
  <param name="movie" value="flash/<?php echo $row_Recordset1[&#39;flash&#39;]; ?>"> 
  <param name="quality" value="high"> 
  <embed src="flash/<?php echo $row_Recordset1[&#39;flash&#39;]; ?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="282" height="226"></embed> 
</object> 
</noscript> 
/***************************************************\ 
</td> 
   <td><img src="spacer.gif" width="1" height="129" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td height="8" bgcolor="#FFFFFF"></td> 
   <td><img src="spacer.gif" width="1" height="8" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td rowspan="7" bgcolor="#FFFFFF"><img name="ficha_prod_r9_c3" src="http://www.forosdelweb.com/images/banner_prod.gif" width="177" height="302" border="0" id="ficha_prod_r9_c3" alt="" /></td> 
   <td><img src="spacer.gif" width="1" height="80" border="0" alt="" /></td> 
  </tr> 
   
    <td height="112" colspan="8" rowspan="4" bgcolor="#D8D8CC"><table width="257" border="0" align="center" cellpadding="0" cellspacing="0"> 
      <tr> 
        <td><?php         $producto_id=$row_Recordset1[&#39;id&#39;];  
                                
include(&#39;img_inc.php&#39;); 
 
?></td> 
      </tr> 
    </table></td> 
    <td height="5">&nbsp;</td> 
  
  <tr> 
   <td height="5"><img src="spacer.gif" width="1" height="53" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td height="3"><img src="spacer.gif" width="1" height="3" border="0" alt="" /></td> 
  </tr> 
  <tr> 
    <td><img src="spacer.gif" width="1" height="53" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td colspan="7" bgcolor="#D8D8CC">&nbsp;</td> 
   <td bgcolor="#D8D8CC">&nbsp;</td> 
   <td><img src="spacer.gif" width="1" height="28" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td colspan="7" bgcolor="#FFFFFF">&nbsp;</td> 
   <td bgcolor="#FFFFFF">&nbsp;</td> 
   <td><img src="spacer.gif" width="1" height="85" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td height="9" colspan="13" bgcolor="#FFFFFF"></td> 
   <td><img src="spacer.gif" width="1" height="9" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td colspan="13" valign="top"><p style="margin:0px"></p></td> 
   <td><img src="spacer.gif" width="1" height="8" border="0" alt="" /></td> 
  </tr> 
  <tr> 
   <td bgcolor="#FFFFFF">&nbsp;</td> 
   <td colspan="11" bgcolor="#FFFFFF"><img name="ficha_prod_r17_c3" src="http://www.forosdelweb.com/images/abajofon.jpg" width="741" height="40" border="0" id="ficha_prod_r17_c3" alt="" /></td> 
   <td bgcolor="#FFFFFF">&nbsp;</td> 
   <td><img src="spacer.gif" width="1" height="40" border="0" alt="" /></td> 
  </tr> 
</table> 

</body> 
</html> 
<?php 
mysql_free_result
($Recordset1); 
?> 


Ahy les marco el codigo del flash... Saludos

3
PHP / AYUDA: Repeat Area Horizontal
« en: 07 de Diciembre de 2007, 16:38:30 pm »
disculpen alguien sabria como hacer una tabla 3 x 3 y q esta se rellene con los campos de una columna extraiga de la base de datos por ejemplo la columna imagen

imagen1 imagen2 imagen3
imagen4 imagen5 imagen6

de antemano gracias!!!!

este es mi codigo al q quiero aplicarle eso


<?php require_once(&#39;Connections/connect.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$maxRows_Recordset1 3;
$pageNum_Recordset1 0;

if (isset(
$_GET[&#39;pageNum_Recordset1&#39;])) {
  
$pageNum_Recordset1 $_GET[&#39;pageNum_Recordset1&#39;];
}
$startRow_Recordset1 $pageNum_Recordset1 $maxRows_Recordset1;

mysql_select_db($database_connect$connect);
$query_Recordset1 "SELECT imagen FROM marca ORDER BY nombre ASC";
$query_limit_Recordset1 sprintf("%s LIMIT %d, %d"$query_Recordset1$startRow_Recordset1$maxRows_Recordset1);
$Recordset1 mysql_query($query_limit_Recordset1$connect) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);

if (isset(
$_GET[&#39;totalRows_Recordset1&#39;])) {
  
$totalRows_Recordset1 $_GET[&#39;totalRows_Recordset1&#39;];
} else {
  
$all_Recordset1 mysql_query($query_Recordset1);
  
$totalRows_Recordset1 mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="48%"><table border="0" cellpadding="2" cellspacing="2">
      <tr>
        <td>imagen</td>
      </tr>
      <?php do { ?>
      <tr>
        <td><a href="#" onClick="window.open(&#39;ficha_pr.php?id_marca=<?=$id_marca;?>;&#39;,&#39;verimagen&#39;, &#39;width=400,height=400&#39;); return false;"><img src="images/<?php echo $row_Recordset1[&#39;imagen&#39;]; ?>" width="200" height="200" class="bordeimg" /></a></td>
      </tr>
      <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?>
    </table></td>
    <td width="48%">&nbsp;</td>
    <td width="4%">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result
($Recordset1);
?>

4
PHP / [AYUDA] MySQL server version
« en: 16 de Noviembre de 2007, 20:19:52 pm »
Saludos, tengo un problema y es q hice un listado de productos el cual llama a una base de datos .. al probarlo de manera local funciona perfecto.. pero al subirlo a la web da el siguiente error...

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Alguien podria ayudarme? aqui les dejo el codigo

<?php require_once(&#39;Connections/listproduc.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_listproduc$listproduc);
$query_Recordset1 "SELECT * FROM categoria WHERE id_marca = 0";
$Recordset1 mysql_query($query_Recordset1$listproduc) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);

mysql_select_db($database_listproduc$listproduc);
$query_Recordset7 "SELECT * FROM categoria WHERE id_marca = 1";
$Recordset7 mysql_query($query_Recordset7$listproduc) or die(mysql_error());
$row_Recordset7 mysql_fetch_assoc($Recordset7);
$totalRows_Recordset7 mysql_num_rows($Recordset7);

mysql_select_db($database_listproduc$listproduc);
$query_Recordset8 "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset1[&#39;PKID&#39;];
$Recordset8 mysql_query($query_Recordset8$listproduc) or die(mysql_error());
$row_Recordset8 mysql_fetch_assoc($Recordset8);
$totalRows_Recordset8 mysql_num_rows($Recordset8);
?>

  <p>jdhehdfhekdhke</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col">&nbsp;</th>
  </tr>
  <tr>
    <th scope="col"><?php do { ?>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="5%">&nbsp;</td>
      <td colspan="2" class="tituloPROD"><?php 

      
      
echo $row_Recordset1[&#39;nombre&#39;]; ?>        </td>
    </tr>
   <?php mysql_select_db($database_listproduc$listproduc);
        
$query_Recordset2 "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset1[&#39;PKID&#39;];
        
$Recordset2 mysql_query($query_Recordset2$listproduc) or die(mysql_error());
        
        
$totalRows_Recordset2 mysql_num_rows($Recordset2);
        
        while(
$prod=mysql_fetch_assoc($Recordset2)){?>

        
        <tr>
            <td>&nbsp;</td>
            <td width="8%">&nbsp;</td>
          <td width="87%" colspan="2" class="descPROD">
        <a href="ficha_productos.php?PKID=<?php echo $prod[&#39;PKID&#39;]; ?>"><?php echo $prod[&#39;nombre&#39;]; }?>  </a></td>    
    </tr>       
  </table>
  <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?>&nbsp;</th>
  </tr>
  <tr>
    <th scope="col">&nbsp;</th>
  </tr>
</table>
  

  <p>&nbsp;</p>
<?php do { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="5%" scope="col">&nbsp;</th>
        <th colspan="2" scope="col"><div align="left"><?php echo $row_Recordset7[&#39;nombre&#39;]; ?></div></th>
    </tr>
     <?php mysql_select_db($database_listproduc$listproduc);
        
$query_Recordset8 "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset7[&#39;PKID&#39;];
        
$Recordset8 mysql_query($query_Recordset8$listproduc) or die(mysql_error());
        
        
$totalRows_Recordset8 mysql_num_rows($Recordset8);
        
        while(
$produc=mysql_fetch_assoc($Recordset8)){?>
      <tr>
        <th scope="row">&nbsp;</th>
        <td width="8%" scope="row">&nbsp;</td>
        <td width="87%" scope="row"><a href="ficha_productos.php?PKID=<?php echo $prod[&#39;PKID&#39;]; ?>"><?php echo $produc[&#39;nombre&#39;]; }?>  </a></td>
    </tr>
  </table>
  <?php } while ($row_Recordset7 mysql_fetch_assoc($Recordset7)); ?><p>
    <?php
mysql_free_result
($Recordset1);

mysql_free_result($Recordset7);

mysql_free_result($Recordset8);
?>
</p>
  <p>ifhefhr</p>

5
PHP / menu de navegacion AYUDA!!!!
« en: 29 de Octubre de 2007, 16:38:14 pm »
Saludos tngo una duda y quisiera saber quien me puede ayudar a hacer un menu de navegacion como por ejemplo el q tiene el foro q t va indica ndo la pagina anterior de la q vienes

Comunidad PHPeros > Programacion WEB > Dudas PHP & MySQL > Crear nuevo tema ... alguien podria ayudarme???

6
PHP / [AYUDA] Error al aplicar vinculo
« en: 01 de Octubre de 2007, 17:09:56 pm »
Saludos ... tngo el siguiente problema, tngo un catalogo de productos donde me muestra el listado ordenado por categorias... ahora bien, cuando asigno vinculos a la variable me da o parse error... o me vincula a partir del tercer articulo... de verdad no se donde tngo el error.. aqui les dejo mi codigo para ver si alguien puede hecharme una mano..
gracias
<?php require_once(&#39;Connections/listproduc.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_listproduc$listproduc);
$query_Recordset1 "SELECT * FROM categoria";
$Recordset1 mysql_query($query_Recordset1$listproduc) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);


?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php do { ?>
  <table width="61%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="5%">&nbsp;</td>
      <td colspan="2"><?php 

	
  
	
  echo 
$row_Recordset1[&#39;nombre&#39;]; ?>        </td>
    </tr>
   <?php mysql_select_db($database_listproduc$listproduc);
	
	
$query_Recordset2 "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset1[&#39;PKID&#39;];
	
	
$Recordset2 mysql_query($query_Recordset2$listproduc) or die(mysql_error());
	
	

	
	
$totalRows_Recordset2 mysql_num_rows($Recordset2);
	
	

	
	
while(
$prod=mysql_fetch_assoc($Recordset2)){?>

        
	
	
<tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>
	
	
<a href="ficha.php?PKID">
	
	
<?php echo $prod[&#39;nombre&#39;]; }?>
                </a></td>    
          </tr>
                   
    </table>
  <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?></body>
</html>
<?php
mysql_free_result
($Recordset1);

mysql_free_result($Recordset2);
?>

7
PHP / AYUDA: problema mostrando productos
« en: 28 de Septiembre de 2007, 21:51:32 pm »
Necesito ayuda urgente pls... tngo un listado de productos pero el problema es q solo me muestra a partir del segundo producto... o sea el primero q sale ingresado en la data jamas sale!!!! alguien puede decirme el error?

pero es el primero de cada categoria ejemplo
 en la base de datos tngo
de la categoria
zapato
tngo lso prodcutos
1- rojo
2- negro
3- azul
 solo me salen negro y azul.... el rojo q es el primero de esa categoria no me sale

gracias!!!

<?php require_once(&#39;Connections/listproduc.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

mysql_select_db($database_listproduc$listproduc);
$query_Recordset1 "SELECT * FROM categoria";
$Recordset1 mysql_query($query_Recordset1$listproduc) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);


?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php do { ?>
  <table width="61%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="5%">&nbsp;</td>
      <td colspan="2"><?php 

	
  
	
  echo 
$row_Recordset1[&#39;nombre&#39;]; ?></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="90%"><?php 
	
  
	
mysql_select_db($database_listproduc$listproduc);
	
	
$query_Recordset2 "SELECT * FROM producto WHERE PKIDCAT =".$row_Recordset1[&#39;PKID&#39;];
	
	
$Recordset2 mysql_query($query_Recordset2$listproduc) or die(mysql_error());
	
	
$row_Recordset2 mysql_fetch_assoc($Recordset2);
	
	
$totalRows_Recordset2 mysql_num_rows($Recordset2);
	
	

	
	
while(
$prod=mysql_fetch_assoc($Recordset2)){
	
    echo 
$prod[&#39;nombre&#39;]; }?></td>
    </tr>
      </table>
  <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?></body>
</html>
<?php
mysql_free_result
($Recordset1);

mysql_free_result($Recordset2);
?>

solo se me muestra los resultados a partir del segundo pero no entiendo por que :S

8
PHP / AYUDA Variables Flash a PHP
« en: 20 de Septiembre de 2007, 21:51:23 pm »
alguien puede ayudarme con este post http://www.phperos.net/foro/index.php/topic,1216.0.html ?.. disculpen si hice mal en escribir en este pero es urgente?

9
Flash y ActionScript / [AYUDA] Busqueda en PHP con form en flash
« en: 20 de Septiembre de 2007, 18:18:57 pm »
Saludos estoy haciendo un buscador en php pero el form de busqueda esta en un flash.. como hago para q lo q yo coloque en ese campo de texto sea enviado a mi sistema de busqueda
este es mi codigo


on 
(release) { 
        var 
"motto"
        
getURL("busca.php""_self""GET"); 
        
gotoAndPlay(2); 
}  


en motto q variable debo colocar para q lo q este dentro del texto box sea lo q envie!!!!

10
PHP / AYUDA: Enviar a un amigo
« en: 19 de Septiembre de 2007, 18:44:12 pm »
Saludos una vez mas... Tegno en una web un sistema de enviar a un amigo.. pero siempre me envia la misma URl, es decir la principal de la pagina. Mi intención es q el URL q envie sea el de la pagina en la cual estoy ubicado o sea si estoy en la sección productos me envie a www.dominio.com/productos y no me siga enviando a la principal...
que debo colocar en el link?

<td width="39" class="azulclr_tah_peq"><a href="#" class="azulclr_tah_peq" onclick="MM_openBrWindow(&#39;enviara.php&#39;,&#39;Enviar&#39;,&#39;status=yes,width=350,height=350&#39;)">Enviar</a></td>


Codifo Formulario [COLOR="Red"]enviara.php[/COLOR]

<table width="300" border="0" bgcolor="#009FC5">
  <
tr>
    <
td valign="top">
    <
form id="form1" name="form1" method="post" action="enviarathx.php">
    <
br />
    <
table width="270" border="0" align="center">
      <
tr>
        <
td width="83" class="blc_tah"><div align="right">De
        </
div>          <label></label></td>
        <
td width="10">&nbsp;</td>
        <
td width="171"><input name="de" type="text" class="negro_tah" id="de" /></td>
      </
tr>
      <
tr>
        <
td class="blc_tah"><div align="right">email remitente:</div></td>
        <
td>&nbsp;</td>
        <
td><input name="emailde" type="text" class="negro_tah" id="emailde" /></td>
      </
tr>
      <
tr>
        <
td class="blc_tah"><div align="right">Para:</div></td>
        <
td>&nbsp;</td>
        <
td><input name="para" type="text" class="negro_tah" id="para" /></td>
      </
tr>
      <
tr>
        <
td class="blc_tah"><div align="right">email receptor:</div></td>
        <
td>&nbsp;</td>
        <
td><input name="emailpara" type="text" class="negro_tah" id="emailpara" /></td>
      </
tr>
      <
tr>
        <
td class="blc_tah"><div align="right">Comentarios<br />
        
adicionales</div></td>
        <
td>&nbsp;</td>
        <
td><label>
          <
textarea name="comentenviar" cols="18" rows="5" class="negro_tah" id="textarea"></textarea>
        </
label></td>
      </
tr>
      <
tr>
        <
td class="blc_tah">&nbsp;</td>
        <
td>&nbsp;</td>
        <
td><label>
          <
input name="button" type="submit" class="negro_tah_pq" id="button" value="Enviar" />
          <
input name="button2" type="reset" class="negro_tah_pq" id="button2" value="Borrar" />
        </
label></td>
      </
tr>
    </
table>
    <
br />
    <
br />
    </
form

Codigo enviarthx.php

  
<?php
$sendTo 
$_POST["emailpara"];
$subject $_POST["de"] ." Le ha enviado este mensaje para que visite la siguiente página de Vicson";
$headers "From: "$_POST["de"] ."    <" $_POST["emailde"] .">\r\n";
$headers .= "Reply-To: " $_POST["emailde"] . "\r\n";
$headers .= "Return-path: " $_POST["emailde"];
$message =  "Su amigo(a) ".$_POST["de"] ."   email: " $_POST["emailde"] . "\n  le ha enviado el siguiente url:" $_POST["url"] ."";
mail($sendTo$subject$message$headers);

?>
    <br />
    <table width="236" border="0" align="center">
      <tr>
        <td><span class="blc_tah">Su amigo(a)</span><span class="azulgrs_tah"> <? echo $para ?> </span><span class="blc_tah">ha recibido su mensaje. </span><br />
          <br />
          <a href="p4_sg.php" class="blc_tah">Cerrar Ventana</a></td>

11
PHP / Borrar registro de la base de datos
« en: 17 de Septiembre de 2007, 17:11:31 pm »
Saludos....aqui yo otra vez molestandolos... bueno mi casoe s q tngo un sistema donde lo uso para publicar noticias.. pero en mi panel de control q lo estoy desarrollando me gustaria q se pudieran eliminar o modificar... mas no se como se hace.. puse los botones pero ni idea... si alguien pudiese ayudarme aqui les dejo el codigo
<?php
mb_http_input
("utf-8");
mb_http_output("utf-8");
?>
<?php 
require(&#39;Connections/noticias.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$editFormAction $_SERVER[&#39;PHP_SELF&#39;];
if (isset($_SERVER[&#39;QUERY_STRING&#39;])) {
  
$editFormAction .= "?" htmlentities($_SERVER[&#39;QUERY_STRING&#39;]);
}

if ((isset(
$_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  
$insertSQL sprintf("INSERT INTO noticias (id, fecha, noticia) VALUES (%s, %s, %s)",
                       
GetSQLValueString($_POST[&#39;id&#39;], "int"),
                       
GetSQLValueString($_POST[&#39;fecha&#39;], "date"),
                       
GetSQLValueString($_POST[&#39;noticia&#39;], "text"));

  
mysql_select_db($database_noticias$noticias);
  
$Result1 mysql_query($insertSQL$noticias) or die(mysql_error());

  
$insertGoTo "news.php";
  if (isset(
$_SERVER[&#39;QUERY_STRING&#39;])) {
    
$insertGoTo .= (strpos($insertGoTo, &#39;?&#39;)) ? "&" : "?";
    
$insertGoTo .= $_SERVER[&#39;QUERY_STRING&#39;];
  
}
  
header(sprintf("Location: %s"$insertGoTo));
}

$maxRows_Recordset1 10;
$pageNum_Recordset1 0;
if (isset(
$_GET[&#39;pageNum_Recordset1&#39;])) {
  
$pageNum_Recordset1 $_GET[&#39;pageNum_Recordset1&#39;];
}
$startRow_Recordset1 $pageNum_Recordset1 $maxRows_Recordset1;

mysql_select_db($database_noticias$noticias);
$query_Recordset1 "SELECT * FROM noticias ORDER BY id ASC";
$query_limit_Recordset1 sprintf("%s LIMIT %d, %d"$query_Recordset1$startRow_Recordset1$maxRows_Recordset1);
$Recordset1 mysql_query($query_limit_Recordset1$noticias) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);

if (isset(
$_GET[&#39;totalRows_Recordset1&#39;])) {
  
$totalRows_Recordset1 $_GET[&#39;totalRows_Recordset1&#39;];
} else {
  
$all_Recordset1 mysql_query($query_Recordset1);
  
$totalRows_Recordset1 mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

mysql_select_db($database_noticias$noticias);
$query_Recordset1 "SELECT * FROM noticias ORDER BY id ASC LIMIT 10"
$Recordset1 mysql_query($query_Recordset1$noticias) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors=&#39;&#39;,args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf(&#39;isEmail&#39;)!=-1) { p=val.indexOf(&#39;@&#39;);
          if (p<1 || p==(val.length-1)) errors+=&#39;- &#39;+nm+&#39; must contain an e-mail address.\n&#39;;
        } else if (test!=&#39;R&#39;) { num = parseFloat(val);
          if (isNaN(val)) errors+=&#39;- &#39;+nm+&#39; must contain a number.\n&#39;;
          if (test.indexOf(&#39;inRange&#39;) != -1) { p=test.indexOf(&#39;:&#39;);
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+=&#39;- &#39;+nm+&#39; must contain a number between &#39;+min+&#39; and &#39;+max+&#39;.\n&#39;;
      } } } else if (test.charAt(0) == &#39;R&#39;) errors += &#39;- &#39;+nm+&#39; is required.\n&#39;; }
    } if (errors) alert(&#39;The following error(s) occurred:\n&#39;+errors);
    document.MM_returnValue = (errors == &#39;&#39;);
} }
//-->
</script>
<link href="estilos.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form action="<?php echo $editFormAction?>" method="post" name="form1" id="form1">
  <table align="center">
    <tr valign="baseline">
      <td align="right" nowrap="nowrap" class="verdana_once">Fecha:</td>
      <td class="verdana10"><input name="fecha" type="text" id="fecha" onblur="MM_validateForm(&#39;fecha&#39;,&#39;&#39;,&#39;R&#39;);return document.MM_returnValue" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td align="right" valign="top" nowrap="nowrap" class="verdana_once">Noticia:</td>
      <td class="verdana10"><textarea name="noticia" cols="50" rows="5" id="noticia" onblur="MM_validateForm(&#39;noticia&#39;,&#39;&#39;,&#39;R&#39;);return document.MM_returnValue"></textarea>
      </td>
    </tr>
    <tr valign="baseline">
      <td align="right" nowrap="nowrap" class="verdana10">&nbsp;</td>
      <td class="verdana10"><input type="submit" value="Insertar Noticia" /></td>
    </tr>
  </table>
  <input type="hidden" name="id" value="" />
  <input type="hidden" name="MM_insert" value="form1" />
</form>
<p>&nbsp;</p>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
  <tr>
    <td width="10%" class="titulos"><strong>ID</strong></td>
    <td width="14%" class="titulos"><strong>Fecha</strong></td>
    <td width="60%" class="titulos"><strong>Noticia</strong></td>
    <td width="16%">&nbsp;</td>
  </tr>
</table>
<br />
<?php do { ?>
  <table width="100%" border="0" cellpadding="0" cellspacing="3">
    <tr>
      <td width="10%" class="verdana10"><?php echo "$row_Recordset1[id]"?></td>
      <td width="14%" class="verdana10"><?php echo "$row_Recordset1[fecha]"?></td>
      <td width="60%" class="verdana10"><?php echo "$row_Recordset1[noticia]"?></td>
      <td width="16%" class="verdana10">Eliminar / Modificar</td>
    </tr>
      </table>
  <?php } while ($row_Recordset1 mysql_fetch_assoc($Recordset1)); ?></body>
</html>
<?php
mysql_free_result
($Recordset1);
?>

12
PHP / ERROR: Registro en Base de datos
« en: 17 de Septiembre de 2007, 14:45:13 pm »
Saludos... tngo un problema.. estoy haciendo una inscripción de usuarios pero uno de los datos siempre me llega en 0.. no se insertan los datos y en realidad he probado mil formas y aun sigue llegando ese valor vacio... ya les muestro...


el codigo:
 <?php require(&#39;Connections/mailinglist.php&#39;); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "&#39;" doubleval($theValue) . "&#39;" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "&#39;" $theValue "&#39;" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$editFormAction $_SERVER[&#39;PHP_SELF&#39;];
if (isset($_SERVER[&#39;QUERY_STRING&#39;])) {
  
$editFormAction .= "?" htmlentities($_SERVER[&#39;QUERY_STRING&#39;]);
}

if ((isset(
$_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
	
$fecha $_POST[&#39;fecha1&#39;] . "-" . $_POST[&#39;fecha2&#39;] . "-" . $_POST[&#39;fecha3&#39;];
$insertSQL sprintf("INSERT INTO registro (id, nombre, apellido, email, telefono, ciudad, fecha) VALUES (%s, %s, %s, %s, %s, %s, %s)",
                       
GetSQLValueString($_POST[&#39;id&#39;], "int"),
                       
GetSQLValueString($_POST[&#39;nombre&#39;], "text"),
                       
GetSQLValueString($_POST[&#39;apellido&#39;], "text"),
                       
GetSQLValueString($_POST[&#39;email&#39;], "text"),
                       
GetSQLValueString($_POST[&#39;telefono&#39;], "int"),
                       
GetSQLValueString($_POST[&#39;ciudad&#39;], "text"),
                       
$fecha);  

  
mysql_select_db($database_mailinglist$mailinglist);
  
$Result1 mysql_query($insertSQL$mailinglist) or die(mysql_error());

  
$insertGoTo "mailreg.php";
  if (isset(
$_SERVER[&#39;QUERY_STRING&#39;])) {
    
$insertGoTo .= (strpos($insertGoTo, &#39;?&#39;)) ? "&" : "?";
    
$insertGoTo .= $_SERVER[&#39;QUERY_STRING&#39;];
  
}
  
header(sprintf("Location: %s"$insertGoTo));
}

mysql_select_db($database_mailinglist$mailinglist);
$query_Recordset1 "SELECT * FROM registro ORDER BY nombre ASC";
$Recordset1 mysql_query($query_Recordset1$mailinglist) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 mysql_num_rows($Recordset1);
?>


<form id="form1" name="form1" method="post" action="">
                            </
form>
                            
                              <
form action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2">
                                <
table align="center">
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">Nombre:</td>
                                    <
td><input type="text" name="nombre" value="" size="32" /></td>
                                  </
tr>
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">Apellido:</td>
                                    <
td><input type="text" name="apellido" value="" size="32" /></td>
                                  </
tr>
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">Email:</td>
                                    <
td><input type="text" name="email" value="" size="32" /></td>
                                  </
tr>
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">Telefono:</td>
                                    <
td><input type="text" name="telefono" value="" size="32" /></td>
                                  </
tr>
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">Ciudad:</td>
                                    <
td><input type="text" name="ciudad" value="" size="32" /></td>
                                  </
tr>
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">Fecha:</td>
                                    <
td><label>

                                      
                                      <
select name="fecha" id="$_request[fecha];">
                                        <
option>2007</option>
                                        <
option>2006</option>
                                        <
option>2005</option>
                                        <
option>2004</option>
                                                                            </
select>
                                      <
select name="fecha2" id="$_request[fecha2];">
                                      <
option>01</option>
                                      <
option>02</option>
                                      <
option>03</option>
                                      <
option>04</option>
                                      </
select>
                                      <
select name="fecha3" id="$_request[fecha3];">
                                      <
option>01</option>
                                      <
option>02</option>
                                      <
option>03</option>
                                      <
option>04</option>
                                      </
select>
                                    </
label></td
                                  </
tr>
                                  <
tr valign="baseline">
                                    <
td nowrap="nowrap" align="right">&nbsp;</td>
                                    <
td><input type="submit" value="Insert record" /></td>
                                  </
tr>
                                </
table>
                                <
input type="hidden" name="id" value="" />
                                <
input type="hidden" name="MM_insert" value="form2" />
                              </
form>
                              <
p>&nbsp;</p></td>
                          </
tr>
                        </
table></td>
                      </
tr>
                      <
tr>
                        <
td width="403"><table width="398" border="0" cellspacing="0" cellpadding="0">
                            <
tr>
                              <
td height="268" align="center" valign="top">&nbsp;</td>
                            </
tr>
                        </
table></td>
                      </
tr>
                    </
table></td>
                    </
tr>
                </
table></td>
              </
tr>
            </
table></td>
            <
td width="14" align="left" valign="top" background="imagenes/lateral_izq.jpg">&nbsp;</td>
          </
tr>
        </
table></td>
      </
tr>
      
    </
table></td>
  </
tr>
  
  <
tr>
    <
td align="left" valign="top"><img src="imagenes/bottom.jpg" width="760" height="19" border="0" /></td>
  </
tr>
  <
tr>
    <
td><span class="style1"><span class="style4">..</span>2007 todos los derechos reservadosWebsite diseñado por <span class="style2">Indexa</span></span></td>
  </
tr>
</
table>
</
body>
</
html>
<?
php
mysql_free_result
($Recordset1);
?>

13
PHP / Sitio multi Lenguajes SOS
« en: 22 de Agosto de 2007, 00:03:46 am »
Saludos, soy algo nuevo en php y estoy desarrollando un sitio donde en el home tngo como includes la cabezera y el pie de pagina, pero en la cabezera tengo seleccion de idioma y quiero q cuando yo elija uno se me cambie el contenido del menu al idioma correspondiente, ya cree el archivo de lenguaje de esta manera

<?php
// LENGUAJE MENU
define('MENU_VPITEM1','Eventos');
define('_VPITEM2','Noticias');
define('_VPITEM3','Tienda');
define('_VPITEM4','Distribuidores');
define('_VPITEM5','Tarifas');
define('_VPITEM6','Soporte');                     
define('_VPITEM7','Contacto');   
define ('CONTENT_BUTTONNEXT', 'Go');                  
?>

ese es el de Español obvio tambien cree el de ingles... mi pregunta es ¿Que debo hacer ahora para que esto funcione???... solo quiero que si yo selecciono ingles el contenido de menu cambie a ingles... y asi con el resto de los idiomas

Si pueden ayudarme de corazon se los agradezco!!!!

Páginas: [1]