 |
|
 |
| |
|
|
| |
Kunne du måske beskrive fejlen....???? Altså hvis du ønsker at få hjælp, har ikke tænkt mig at tjekke det der igennem for at finde fejlen...
Tralalala?
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
#0 Du kan ikke lave en header() hvis der er udskrevet noget til browseren først. Og her har du jo lavet <html>, <head> osv. først. I linje 10 bruger du variablen $sql, men den opretter du først en linje senere.
:)
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
$sql er ikke sat. før du bruger mysql_query($sql,$dblink) og du kan ikke print efter du har brugt header
90% af alle teenagere ville dø hvis Arto havde en systemfejl og blev permanent lukket. Hvis du er en af de 10% der ville grine, copy & paste dette til din signatur.
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
<?php function HeaderLocation($file) { header("Location: $file"); } ?> <html> <head> <title>Team.UnderZone</title> </head> <body> <?php if($_POST['username'] && $_POST['password']) { $dbLink = mysql_connect("lhost", "user", "blah"); $sql = "SELECT * FROM user_table WHERE username = '".$_POST['username']."' AND password = '".$_POST['password']."'"; $result = mysql_query($sql, $dbLink); if (mysql_num_rows($result) == 1) { HeaderLocation("admin_logged.php"); } else { HeaderLocation("admin_login.php"); } ?> </body> </html> Det skulle virke. Spørg hvis der er noget du ikke forstår.
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
$file ?
PlusFM ! :D <a href="http://aemme.alwaysdata.net/"><img src="http://aemme.alwaysdata.net/EU-Vashj-Nizlax.png">< ;/a>
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
#4 Parse error: syntax error, unexpected $end in /customers/julefar.dk/julefar.dk/httpd.www/underzone/checkpoint.php on line 24 <-- siger den !
PlusFM ! :D <a href="http://aemme.alwaysdata.net/"><img src="http://aemme.alwaysdata.net/EU-Vashj-Nizlax.png">< ;/a>
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
<?php function HeaderLocation($file) { header("Location: $file"); } ?> <html> <head> <title>Team.UnderZone</title> </head> <body> <?php if($_POST['username'] && $_POST['password']) { $dbLink = mysql_connect("lhost", "user", "blah"); $sql = "SELECT * FROM user_table WHERE username = '".$_POST['username']."' AND password = '".$_POST['password']."'"; $result = mysql_query($sql, $dbLink); if (mysql_num_rows($result) == 1) { HeaderLocation("admin_logged.php"); } else { HeaderLocation("admin_login.php"); } } ?> </body> </html>
Portfolio: http://dumpen.dk
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
#7 > den sender mig ikke frem eller tilbage !
PlusFM ! :D <a href="http://aemme.alwaysdata.net/"><img src="http://aemme.alwaysdata.net/EU-Vashj-Nizlax.png">< ;/a>
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
Bare mig, eller bliver $file ikke sat ;)?
.
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
#8 > Brug noget meta tag så. #9 > Den bliver sat ved HeaderLocation("admin_logged.php");
Portfolio: http://dumpen.dk
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
Altså det aller bedst var nok bare at droppe HTML'en <?php if($_POST['username'] && $_POST['password']) { $dbLink = mysql_connect("lhost", "user", "blah"); $sql = "SELECT * FROM user_table WHERE username = '".$_POST['username']."' AND password = '".$_POST['password']."'"; $result = mysql_query($sql, $dbLink); if (mysql_num_rows($result) == 1) { header("Location: admin_logged.php"); } else { header("Location: admin_login.php"); } } ?>
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
#11 > virker heller ikke !
PlusFM ! :D <a href="http://aemme.alwaysdata.net/"><img src="http://aemme.alwaysdata.net/EU-Vashj-Nizlax.png">< ;/a>
|
|
 |
|
 |
|
|
|
 |
|
 |
| |
|
|
| |
#14 > nej ! ...
PlusFM ! :D <a href="http://aemme.alwaysdata.net/"><img src="http://aemme.alwaysdata.net/EU-Vashj-Nizlax.png">< ;/a>
|
|
 |
|
 |
|
 |
|
 |
| |
|
|
| |
#13 > den sender dig ikke vidre !
PlusFM ! :D <a href="http://aemme.alwaysdata.net/"><img src="http://aemme.alwaysdata.net/EU-Vashj-Nizlax.png">< ;/a>
|
|
 |
|
 |
|
|