Hi, im trying to do this the most automate as possible...
i want this scripts to make the input as the user ask, for example "3" then,
each input must have a different name, i've tried with the "for" control
structure but can't get to the point. then the fields are created in a db...

$query=mysql_query("Select * from empresas_dpto order by id desc");

$form = "<input type=\"text\" name=\"duh\">  |  ";

if ($tipo=="crear") {

// si la cantidad de campos requeridos es mayor a 40 entonces da error //

if ($crear_empresas > 40) {

<table width="100%" border="0" cellspacing="1" cellpadding="1"
      <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"
size="3" color="#FF0000"><b>La
        Empresa no puede tener m&aacute;s de 60 Departamentos Haga click <a
        para volver</b></font></div>
} ?>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
      <div align="center"><font size="3" color="#FF0000" face="Verdana,
Arial, Helvetica, sans-serif"><b>Recuerde
        que los campos no pueden contener espacios a la hora de crear los
        </b> </font></div>

echo str_repeat($form, $crear_empresas);


else {


<form name="x" method="post" action="aempresas.php?tipo=crear">
  <input type="text" name="crear_empresas" value="">
  <input type="submit" name="Submit" value="Elaborar Planillas">

<? } ?>

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to