Ayuda con este codigo
<?php
include("conec.php");
$link = Conectarse();
$result = mysql_query("SELECT * FROM horario",$link);
?>
<html>
<head>
<title>Horario</title>
</head>
<body>
<?php
if ($_POST['insertar'] != 'Enviar' )
{
echo '
<form name='form1' method='POST' action='$PHP_SELF'>
<tabel>
<tr>
<td>Codigo</td>
<td><input type='text' name='cod'></td>
</tr>
<tr>
<td>Nombre</td>
<td><input type='text' name='nom'></td>
</tr>
<tr>
<td>Paralelo</td>
<td><input type='text' name='par'></td>
</tr>
<tr>
<td>Ubicacion</td>
<td>
<input type='text' name='ubi'></td>
</tr>
<tr>
<td>Codigo de horario</td>
<td>
<select name='coh'>
<option >Seleccionar</option>
<?php
while($fila=mysql_fetch_array($result))
{ ?>
<option value<?php echo $fila['hor_h']?>> <?php echo $fila['sec_h'];?> </option>
<?php } ?>
</select>
</td>
</tr>
</table>
</form>';
}
else
if ($_POST['insertar'] == 'Enviar' )
{
include ("conec.php");
$link = conectarse();
$codigo=$_POST['cod'];
$nombre=$_POST['nom'];
$paralelo=$_POST['par'];
$ubicacion=$_POST['ubi'];
$codigoh=$_POST['coh'];
mysql_query("INSERT INTO curso VALUES ('$codigo', '$nombre', '$paralelo','$ubicacion','$codigoh')", $link);
if(mysql_query)
{
echo "<meta http-equiv="refresh" content="0;URL=http://127.0.0.1/proyecto_progra/">";
}
}
?>
</body>
</html>
En el codigo que les muestro tengo un error al momento de publicarlo en joomla no se porque no me presenta nada estoy usando un plugin llamado Dirct PHP
ppara escribir codigo en joomla si me ayudaran a solucioanr el rpoblema les agradesco mucho.