Newbie Frage ( Php )

Seite 1 von 2 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/newbie_frage_php_34675/page_1 - zur Vollversion wechseln!


Dragonskin schrieb am 18.05.2002 um 12:41

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 !!!!!!!!!!";
}
?>


noledge schrieb am 18.05.2002 um 12:50

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 !!!!!!!!!!";


Dragonskin schrieb am 18.05.2002 um 12:51

was war falsch?


noledge schrieb am 18.05.2002 um 12:52

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


Dragonskin schrieb am 18.05.2002 um 12:58

so ejtzt kommt-->

Zitat
Parse error: parse error in /home/www/web1/html/Grisu/Admin/php/login.php on line 53


noledge schrieb am 18.05.2002 um 13:00

hast hinten das

<<< wieder abgeschlossen?
also

<<<test

test;

?


Dragonskin schrieb am 18.05.2002 um 14:21

so wie du mkir es reinkopiert hastz so habe ich es in meinen login getan


noledge schrieb am 18.05.2002 um 14:23

äh.. uups :o

}
?>

hinten dran


watchout schrieb am 19.05.2002 um 13:46

(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....


funka schrieb am 19.05.2002 um 14:53

jo
aber echo <<< EOT is halt fuer sowas gedacht...


watchout schrieb am 20.05.2002 um 19:56

Zitat von funka
jo
aber echo <<< EOT is halt fuer sowas gedacht...

'ma egal - funktioniert, wie's geht... :D


schrieb am 21.05.2002 um 03:51

da ist ein

?>
langerhtmltext
<?

gscheiter :rolleyes:


jives schrieb am 21.05.2002 um 12:15

Right :) Und wennst vars ausgeben musst, maschst das mit

vielhtml <?php echo $blah; ?> vielhtml


schrieb am 21.05.2002 um 12:25

<?= $var ?>
;)


schrieb am 21.05.2002 um 12:28

Zitat von .deRElict.
<?= $var ?>
;)

genau.

trotzdem kostet jeder context switch wieder zeit. :(

drum: intelligent switchen spart zeit :)




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025