URL: https://www.overclockers.at/coding-stuff/newbie_frage_php_34675/page_1 - zur Vollversion wechseln!
bekomm immer Meldung ->
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/www/web1/html/Grisu/Admin/php/login.php on line 20
Parse error: parse error in /home/www/web1/html/Grisu/Admin/php/login.php on line 21
Mein script -->
Zitat<?
if ($pwd == lol)
{
echo "
<html>
<head>
<title>:: Admin bereich ::</title>
</head>
<body bgcolor=\"#D8D8D8\" text=\"black\">
<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; text-align:center\" bordercolor=\"#111111\" width=\"47%\" height=\"127\" align=\"center\">
<tr>
<td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\">
<p style=\"text-align: left\"><b>:: Admin Bereich für <font color=\"red\"> $User </font> ::</b></td>
</tr>
<tr>
<td width=\"100%\" height=\"87\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" height=\"65\">
<tr>
<BR>
<form action=\"news.php\" method=\"post"\>
<td width=\"29%\" height=\"19\">News schreiben</td>
<td width=\"71%\" height=\"19\">
<p><input type=\"Submit\" name=\"lingrtf\"></form></td>
</tr>
<tr>
<td width=\"29%\" height=\"19\">Password:</td>
<td width=\"71%\" height=\"19\">
<FORM ACTION=\"http://www.cwsurf.de/Grisu/Admin/php/login.php\" METHOD=\"POST\">
<INPUT TYPE=\"password\" NAME=\"pwd\"></td>
</tr>
<tr>
<td width=\"29%\" height=\"19\">
<p align=\"center\">
<br>
<input type=\"submit\" value=\"Login\" name=\"B1\"></CENTER></form></td>
<td width=\"71%\" height=\"19\">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\">
<p align=\"right\"><b><font size=\"2\" color=\"#FFFFFF\">© by [ETP]Grisu</font></b></td>
</tr>
</table>
</center>
</div>
";
} else {
echo "Falsches pwd !!!!!!!!!!";
}
?>
Code: PHP<? if ($pwd == lol) { echo <<<test <html> <head> <title>:: Admin bereich ::</title> </head> <body bgcolor=\"#D8D8D8\" text=\"black\"> <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; text-align:center\" bordercolor=\"#111111\" width=\"47%\" height=\"127\" align=\"center\"> <tr> <td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\"> <p style=\"text-align: left\"><b>:: Admin Bereich für <font color=\"red\"> $User </font> ::</b></td> </tr> <tr> <td width=\"100%\" height=\"87\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" height=\"65\"> <tr>"; <BR> <form action=\"news.php\" method=\"post"\> <td width=\"29%\" height=\"19\">News schreiben</td> <td width=\"71%\" height=\"19\"> <p><input type=\"Submit\" name=\"lingrtf\"></form></td> </tr> <tr> <td width=\"29%\" height=\"19\">Password:</td> <td width=\"71%\" height=\"19\"> <FORM ACTION=\"http://www.cwsurf.de/Grisu/Admin/php/login.php\" METHOD=\"POST\"> <INPUT TYPE=\"password\" NAME=\"pwd\"></td> </tr> <tr> <td width=\"29%\" height=\"19\"> <p align=\"center\"> <br> <input type=\"submit\" value=\"Login\" name=\"B1\"></CENTER></form></td> <td width=\"71%\" height=\"19\"> </td> </tr> </table> </td> </tr> <tr> <td bgcolor=\"#B4B4B4\" width=\"100%\" height=\"19\"> <p align=\"right\"><b><font size=\"2\" color=\"#FFFFFF\">© by [ETP]Grisu</font></b></td> </tr> </table> </center> </div> test; } else { echo "Falsches pwd !!!!!!!!!!";
was war falsch?
des echo über mehrere zeilen mag er offenbar ned
ein
echo <<<whatever
und am ende
whatever;
korrigiert das, die backslashes vor den " kannst da dann auch sparen
so ejtzt kommt-->
ZitatParse error: parse error in /home/www/web1/html/Grisu/Admin/php/login.php on line 53
hast hinten das
<<< wieder abgeschlossen?
also
<<<test
test;
?
so wie du mkir es reinkopiert hastz so habe ich es in meinen login getan
äh.. uups
}
?>
hinten dran
(will hier nur deponieren, dass es bei mir mit mehrzeiligen strings perfekt funktioniert... )
Edit: Falsch ausgedrückt: Bei mir funktionieren mehrzeilige Strings perfekt/ohne Probleme....
jo
aber echo <<< EOT is halt fuer sowas gedacht...
Zitat von funkajo
aber echo <<< EOT is halt fuer sowas gedacht...
da ist ein
?>
langerhtmltext
<?
gscheiter
Right Und wennst vars ausgeben musst, maschst das mit
vielhtml <?php echo $blah; ?> vielhtml
<?= $var ?>
Zitat von .deRElict.<?= $var ?>
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025