hola quetal alguin me puede ayudar a corregir este error
warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\prueba\proyecto2\alumno_modificar.p hp on line 15
lo que quiero hacer es que me muestre los registros consultados en las cajas de texto pero me sale ese warning
les dejo el codigo
Código:
<?
include("conexion.php");
$rst_categorias=mysql_query("SELECT * FROM carreras;",$conexion);
if (mysql_num_rows($rst_categorias)==0)
{
mysql_close($conexion);
echo mostrar_mensaje("Debe agregar categorias","No hay categorias. Clic para registrarlas","");
exit();
}
//mostrar datos del registro seleccionado
$rst_alumnos=mysql_query("SELETC * FROM usuarios WHERE nombre=".$_REQUEST["idn"].";",$conexion);
$fila_alumno=mysql_fetch_array($rst_alumnos);
?>
<!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=iso-8859-1" />
<title>Documento sin título</title>
<style type="text/css">
<!--
.Estilo1 {color: #0000FF}
-->
</style>
</head>
<center>
<table width="800" border="0">
<tr>
<td height="18"><div align="center" class="title" >Modificar registro </div></td>
</tr>
<tr>
<td><div align="center" class="Estilo1"></div>
<div align="center" class="Estilo1"><a href="javascript:history.go(-1)">Regresar al listado de productos</a></div></td>
</tr>
<tr>
<td class="style6"><form name="productos" action="alumnew_guardar.php" title="Nuevo Producto" style="border:thin" method="post">
<table style="width: 100%">
<tr>
<td style="width: 200px" class="style5">Id<span class="style8">*</span></td>
<td class="style7">
<input name="codigo" type="text" class="style10" style="width: 65px" value="<?php echo $fila_alumno["id"]?>"></td>
</tr>
<tr>
<td style="width: 200px" class="style5">Nombre<span class="style8">*</span></td>
<td class="style7"><input name="nombre" type="text" style="width: 331px" class="style10" /></td>
</tr>
<tr>
<td style="width: 200px" class="style5">Apellidos<span class="style8">*</span></td>
<td class="style7"><input name="apellidos" type="text" class="style10" id="apellidos"></td>
</tr>
<tr>
<td style="width: 200px" class="style5">Calificaciones<span class="style8">*</span></td>
<td class="style7"><input name="calificaciones" type="text" class="style10" id="calificaciones"></td>
</tr>
<tr>
<td style="width: 200px" class="style5"> </td>
<td class="style7"> </td>
</tr>
<tr>
<td style="width: 200px" class="style5"> </td>
<td class="style7"> </td>
</tr>
<tr>
<td style="width: 200px" class="style5">Carreras<span class="style8">*</span></td>
<td class="style7">
<select name="carreras" class="style10" id="carreras">
<option selected="" value="">[Seleccione una categoría]</option>
<?php
while ($fila=mysql_fetch_array($rst_categorias))
{
echo "<option value='". $fila["idcarreras"]."'>".$fila["nomcarreras"] ."</option>";
}
?>
</select></td>
</tr>
<tr>
<td style="width: 200px" class="style5"> </td>
<td class="style7"> </td>
</tr>
<tr>
<td style="width: 200px" class="style5"> </td>
<td class="style11">
* <span class="style12">Los campos son requeridos.</span></td>
</tr>
</table>
*<input name="Submit1" type="submit" value="Guardar"></form>
</td>
</tr>
</table>
</center>
</body>
</html>