"We are back" « oc.at

Newbie Frage ( Php )

Dragonskin 18.05.2002 - 12:41 1083 19
Posts

Dragonskin

Banned
Registered: Jan 2002
Location: Austria - Linz
Posts: 402
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

CWNE #540
Avatar
Registered: Apr 2001
Location: ::1
Posts: 6837
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

Banned
Registered: Jan 2002
Location: Austria - Linz
Posts: 402
was war falsch?

noledge

CWNE #540
Avatar
Registered: Apr 2001
Location: ::1
Posts: 6837
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

Banned
Registered: Jan 2002
Location: Austria - Linz
Posts: 402
so ejtzt kommt-->
Zitat
Parse error: parse error in /home/www/web1/html/Grisu/Admin/php/login.php on line 53

noledge

CWNE #540
Avatar
Registered: Apr 2001
Location: ::1
Posts: 6837
hast hinten das

<<< wieder abgeschlossen?
also

<<<test

test;

?

Dragonskin

Banned
Registered: Jan 2002
Location: Austria - Linz
Posts: 402
so wie du mkir es reinkopiert hastz so habe ich es in meinen login getan

noledge

CWNE #540
Avatar
Registered: Apr 2001
Location: ::1
Posts: 6837
äh.. uups :o

}
?>

hinten dran

watchout

Legend
undead
Avatar
Registered: Nov 2000
Location: Off the grid.
Posts: 6845
(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....
Bearbeitet von watchout am 19.05.2002, 13:48

funka

Legend
ex-prophet(down below)
Registered: Sep 2000
Location: Vienna / SF
Posts: 6131
jo
aber echo <<< EOT is halt fuer sowas gedacht...

watchout

Legend
undead
Avatar
Registered: Nov 2000
Location: Off the grid.
Posts: 6845
Zitat von funka
jo
aber echo <<< EOT is halt fuer sowas gedacht...

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

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
da ist ein

?>
langerhtmltext
<?

gscheiter :rolleyes:

jives

And the science gets done
Avatar
Registered: Sep 2001
Location: Baden
Posts: 3548
Right :) Und wennst vars ausgeben musst, maschst das mit

vielhtml <?php echo $blah; ?> vielhtml

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
<?= $var ?>
;)

Guest

Deleted User
Registered: n/a
Location:
Posts: n/a
Zitat von .deRElict.
<?= $var ?>
;)

genau.

trotzdem kostet jeder context switch wieder zeit. :(

drum: intelligent switchen spart zeit :)
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz