Prueba con esto:
Código PHP:
Ver original<?php
include("config.php");
echo '<html>
<body>
<h1><center>
<p>AGREGA BIENES</p>
</center></h1>
<form action="crea_bienes.php" method="POST">
<div align="center">
<table width="415" border="0">
<tr>
<td width="169" height="69">
NO_INVENTARIO:
</td>
<td width="236">
<input name="inventario" type="text" size=30>
</td>
</tr>
<tr>
<td height="61">
DESCRIPCION:
</td>
<td>
<input size=30 type="text" name="descripcion">
</td>
</tr>
<tr>
<td height="60">
ESTADO FISICO:
</td>
<td>
<select name="nombre_estado_fisico">
<option>Selecciona Estado Fisico </option>';
$link=Conectarse();
$query="SELECT nombre_estado_fisico FROM estado_fisico";
if ($resultado)
{
$valor=$renglon['nombre_estado_fisico'];
echo '<option value="'.$valor.'">"'.$valor.'"</option>';
}
echo'</select>
</td>
</tr>
<tr>
<td height="60">
RESGUARDANTE:
</td>
<td>
<select name="nombre_resguardante">
<option>Selecciona Resguardante </option>';
$link=Conectarse();
$query="SELECT nombre_resguardante FROM resguardan";
if ($resultado)
{
$valor=$renglon['nombre_resguardante'];
echo '<option value="'.$valor.'">"'.$valor.'"</option>';
}
echo'</select>
</td>
</tr>
<tr>
<td height="60">
NIVEL:
</td>
<td>
<select name="nivel">
<option>Selecciona Nivel </option>';
$link=Conectarse();
$query="SELECT nivel FROM niveles";
if ($resultado)
{
$valor=$renglon['nivel'];
echo '<option value="'.$valor.'">"'.$valor.'"</option>';
}
echo'</select>
</td>
</tr>
<tr>
<td height="60">
SECCIONES:
</td>
<td>
<select name="nombre_seccion">
<option>Selecciona Seccion </option>';
$link=Conectarse();
$query="SELECT nombre_seccion FROM secciones";
if ($resultado)
{
$valor=$renglon['nombre_seccion'];
echo '<option value="'.$valor.'">"'.$valor.'"</option>';
}
echo'</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<a href="modificar.php">Volver al Menu </a>
</td>
<td height="55" colspan="2" align="center">
<input type="submit" name="Guardar">
</td>
</tr>
</table>
<h5> . . . Escribir en mayusculas . . .</h5>
</div>
</form>
</body>
</html>';
?>
y recibes :
Código PHP:
Ver original<?php
include("config.php");
$link = Conectarse();
$query = sprintf("SELECT no_inventario FROM bienes WHERE bienes.no_inventario='%s'", {
echo "El numero de inventario ya existe en la BD";
}
if($no_inventario==NULL|$descripcion==NULL|$estado_fisico==NULL|$resguardante==NULL|$nivel==NULL|$seccion==NULL)
{
echo "<center><b><h4>Uno o mas campos estan vacios, verifica bien tus datos </h4></b></center>";
echo '<center><b><a href="agregar_bienes.php">Volver</b></center></a>';
}
else
{
$query = sprintf("INSERT INTO bienes (no_inventario, descripcion, estado_fisico, resguardante, nivel, seccion) VALUES ('%s','%s','%s', '%s','%s','%s')", header('Location:modificar.php'); {
echo "Los datos han sido correctamente insertados";
}
else
{
echo "Error introduciendo los datos";
}
}
?>
Fijate que tenias error en los option, problemas con las " y al momento de recibir igual, no veo la necesidad de utilizar Js

saludos.