PHP - Redirección ilógica.

 
Vista:

Redirección ilógica.

Publicado por Juli (8 intervenciones) el 01/07/2015 23:57:56
Estoy intentando hacer un programa, esto es apenas el comienzo. Al principio andaba pero cuando hice algunas modificaciones empezó a redireccionarme a "localhost/xampp" y no tengo idea de por qué puede ser ¿alguien puede ayudarme?

Estos son los códigos:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" href="css/normal.css" type="text/css" media="all" />
	</head>
 
	<body>
		<header id="header1">
			<a href="index.html"><IMG src="img/logo.png" id="logo"></a>
		</header>
		<br><br>
		<aside id="aside1">
			<hgroup>
				<a href="clientes.php"><h2>Clientes</h2></a>
				<nav>
					<li class="parent"><a href="#"><h3>Buscar Cliente</h3></a>
						<ul>
							<li>
								<form action="bclientes.php" method="POST">
									Ingrese b&uacute;squeda:
									<br>
									<input type=text name="bcliente" id="bcliente">
									<br>
									<input type=submit value="Enviar">
								<form>
							</li>
						</ul>
					</li>
				</nav>
				<a href="nclientes.html"><h3>Nuevo</h3></a>
				<br>
				<a href="lb1.html"><h2>Libro Diario</h2></a>
 
				<h3>Nuevo</h3>
			</hgroup>
		</aside>-
		<form action="lb1.php" method="POST" accept-charset="UTF-8" name="formu">
			<table>
				<tr>
					<td>
						Asunto:
					</td>
					<td>
						<input type=text name="asunto">
					</td>
				</tr>
				<tr>
					<td>
						Recibo:
					</td>
					<td>
						<input type=text name="recibo" value="-">
					</td>
				</tr>
				<tr>
					<td>
						Debe:
					</td>
					<td>
						<input type=text name="debe" value="0">
					</td>
				</tr>
				<tr>
					<td>
						Haber:
					</td>
					<td>
						<input type=text name="haber" value="0">
					</td>
				</tr>
				<tr>
					<td>
					</td>
					<td>
						<input type=submit value="Enviar">
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>


1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
	$link = mysql_connect('localhost', 'root', '') or die('No se pudo conectar al servidor: ' . mysql_error());
	mysql_select_db('rotary') or die('No se pudo seleccionar la base de datos');
	mysql_query("SET NAMES 'utf8'");
 
	$sql="INSERT INTO `libro_diario`(`asunto`, `recibo`, `debe`, `haber`) VALUES ('$_POST[asunto]','$_POST[recibo]','$_POST[debe]','$_POST[haber]')";
	$result=mysql_query($sql);
	if($result){
		echo "Insertado.";
	}
 
	mysql_close($link);
?>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Vainas
Val: 34
Ha aumentado su posición en 3 puestos en PHP (en relación al último mes)
Gráfica de PHP

Redirección ilógica.

Publicado por Vainas (262 intervenciones) el 03/07/2015 09:31:03
Buenas:

Yo aqui no veo ningun problema. Quizas has tocado algo en el xampp que esta haciendo la redireccion.

Piensa si has tocado algo en xampp y si tienes algun backup de el archivo httpd.conf para recuperarlo.

Espero que te ayude.

Saludos.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar