Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá galera,sou iniciante em PHP,nao sei como que faço pra fazer paginação nesse codigo.Esse codigo exibe os cadastros efetuados.Quem puder me ajudar,desde já agradeço<?include"config.php"; //incluindo o arquivo de conexao feito no passo2$y = mysql_query("SELECT * FROM cadastro");// selecionei a tabela que quero trabalhar que no caso e a que nois criamos no 1º passowhile($x = mysql_fetch_array($y)){ //criei um array chamado $x que sera responssavel pra listar os dadosecho'<form name="form1" method="post" action="inserir.php"><table class="tabela" width="0%" border="0" id="todoform" cellspacing="1" bgcolor="#000000" align=center> <td height="21" width="151"><div align="center">.......Cadastrando.......... </div> <td height="21" width="169"><div align="center">.......Mudança de Função.......... </div> <tr> <td width="151" height="44"><p>Nome Completo <br> <input readonly="readonly" name=nome class=form1 id="nome1" value="'.$x['nome'].'" size=35> </p></td> <td width="245" height="44"><p>Data(dd/mm/aa)<br> <input name=datamudanca class=form1 id="data3" value="'.$x['datamudanca'].'" size=35 maxlength="10" readonly="readonly"> </p></td> </tr> <tr> <td width="151" height="44"><p>Data Admissão(dd/mm/aa)<br> <input name=datadeadmissao class=form1 id="datadeadmissao1" value="'.$x['datadeadmissao'].'" size=35 maxlength="10"> </p></td> <td width="245" height="44"><p>Cargo<br> <input name=cargomudanca class=form1 id="cargo3" value="'.$x['cargomudanca'].'" size=35 readonly="readonly"> </p></td> </tr> <tr> <td width="151" height="44"><p>Data de Nascimento(dd/mm/aa)<br> <input name=datadenascimento class=form1 value="'.$x['datadenascimento'].'" size=35 maxlength="10"> </p></td> <td width="245" height="44"><p>Função<br> <input name=funcaomudanca class=form1 id="funcao3" value="'.$x['funcaomudanca'].'" size=35> </p></td> </tr> <tr> <td width="151" height="44"><p>CTPS (Série - UF)<br> <input name=ctps class=form1 id="ctps2" value="'.$x['ctps'].'" size=35 readonly="readonly"> </p></td> <td width="245" height="44"><p>CBO<br> <input name=cbomudanca class=form1 id="cbo3" value="'.$x['cbomudanca'].'" size=35 readonly="readonly"> </p></td> </tr> <tr> <td width="151" height="44"><p>PIS-PASEP<br> <input name=pispasep class=form1 id="pispasep2" value="'.$x['pispasep'].'" size=35 readonly="readonly"> </p></td> <td width="245" height="44"><p>Descrição das Atividades<br> <textarea readonly="readonly" name="descricaodasatividadesmudanca" cols="25" rows="4" class="form1" id="descricaodasatividades3">'.$x['descricaodasatividadesmudanca'].'</textarea> </p></td> </tr> <tr> <td width="151" height="44"><p>RG<br> <input name=rg class=form1 value="'.$x['rg'].'" size=35> </p></td> <td width="245" height="44"><p>Setor de Trabalho <br> <input name=setordetrabalhomudanca class=form1 id="setordetrabalho3" value="'.$x['setordetrabalhomudanca'].'" size=35> </p></td> </tr> <tr> <td width="151" height="44"><p>Cargo<br> <input name=cargo class=form1 id="cargo2" value="'.$x['cargo'].'" size=35 readonly="readonly"> </p></td> <td width="245" height="44"><p>Data de Demissão(dd/mm/aa) <br> <input name=datadedemissaomudanca class=form1 id="datadedemissao3" value="'.$x['datadedemissaomudanca'].'" size=35 readonly="readonly"> </p></td> </tr> <tr> <td width="151" height="44"><p>Função<br> <input name=funcao class=form1 id="funcao2" value="'.$x['funcao'].'" size=35 readonly="readonly"> </p></td> <td width="245" height="44"> Observação<br> <textarea readonly="readonly" name="observacaomudanca" cols="25" rows="4" class="form1" id="observacao3">'.$x['observacaomudanca'].'</textarea> </td> </tr> <tr> <tr> <td width="151" height="44"><p>CBO<br> <input name=cbo class=form1 id="cbo2" value="'.$x['cbo'].'" size=35> </p></td> <td height="30" width="44"> </td> </tr> <tr> <td width="151" height="44"><p>Descrição das Atividades <br> <textarea readonly="readonly" name="descricaodasatividades" cols="25" rows="4" class="form1" id="descricaodasatividades2">'.$x['descricaodasatividades'].'</textarea> </p></td> <td valign=top height="29" width="245"> </td> </tr> <tr> <td width="151" height="44"><p>Setor de Trabalho <br> <input readonly="readonly" name="setordetrabalho" type="text" class="form1" id="descricaodasatividades2" value="'.$x['setordetrabalho'].'" size="35"> </p></td> <td valign=top height="29" width="245"> </td> </tr> <tr> <td width="151" height="44"><p>Descrição das atividades do Setor <br> <textarea readonly="readonly" name="descricaodasatividadesdosetor" cols="25" rows="4" class="form1" id="descricaodasatividadesdosetor2">'.$x['descricaodasatividadesdosetor'].'</textarea> </p></td> <td valign=top height="29" width="245"> </td> </tr> <tr> <td width="151" height="44"><p>Data do Cadastro <br> <input readonly="readonly" type="text" class="form1" id="descricaodasatividades2" value="'.$x['data'].'" size="35"> </p></td> <td valign=top height="29" width="245"> </td> </tr> </table><br>';}// imprimi os resultados da tabela cadastro na tela?>Carregando comentários...