mi codigo es este nuevo.php:
Código PHP:
<th colspan="2" valign="top" nowrap="yes" align="left">
Nuevo Alumno:
</th></tr>
<tr>
<td nowrap="true" class="primary" valign="top">
N° de credencial </td>
<td valign="top" class="primary">
<?php require('conexion.php');//$id=mysql_insert_id();
$consulta="SELECT MAX( idalumno ) AS id FROM alumno";
$resultado=mysql_query($consulta,$conexion);
while($row=mysql_fetch_array($resultado)){
$id=trim($row["0"]);
}
$id=$id + 1;
echo $id;?></td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">Nombre: </td>
<td valign="top" class="primary">
<input type="text" name="nombre"> </td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">Apellido Paterno: </td>
<td valign="top" class="primary">
<input type="text" name="ap_pat"> </td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">Apellido Paterno:</td>
<td valign="top" class="primary">
<input type="text" name="ap_mat"> </td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">Semestre: </td>
<td valign="top" class="primary">
<select name="semestre" size="1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">Grupo: </td>
<td valign="top" class="primary">
<select name="idgrupo" size="1">
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
<option value="E">E</option>
<option value="F">F</option>
<option value="G">G</option>
<option value="H">H</option>
<option value="I">I</option>
<option value="J">J</option>
<option value="K">K</option>
<option value="L">L</option>
<option value="M">M</option>
</select>
</td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">
Numero de control: </td>
<td valign="top" class="primary">
<input type="text" name="num_control">
</td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top">
Vigencia: </td>
<td valign="top" class="primary">
<input type="date" name="vigencia" id="date">
</td>
</tr>
<tr>
<td nowrap="true" class="primary" valign="top"><input type="submit" name="button" id="button" value="Generar PDF"></td>
<td valign="top" class="primary"><input type="submit" name="button2" id="button2" value="Cancelar"></td>