Seite 1 von 1

Parse error: usercp_register.php Fehler?

Verfasst: 26.12.2004 15:16
von Jan500
hi

immer wenn ich auf profil ändern geh oder auf registrieren kommt folgende fehlöermeldung:
Parse error: parse error in /srv/www/htdocs/web374/html/epiforum/includes/usercp_register.php on line 116
der zugehörige code:
// Strip all tags from data ... may p**s some people off, bah, strip_tags is
// doing the job but can still break HTML output ... have no choice, have
// to use htmlspecialchars ... be prepared to be moaned at.
while( list($var, $param) = @each($strip_var_list) )
{
if ( !empty($HTTP_POST_VARS[$param]) )
{
$$var = trim(htmlspecialchars($HTTP_POST_VARS[$param]));
}
}

$trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');

while( list($var, $param) = @each($trim_var_list) )
{
if ( !empty($HTTP_POST_VARS[$param]) )
{
$$var = trim($HTTP_POST_VARS[$param]);
}
}

$signature = str_replace('<br />', "\n", $signature);

// Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
// empty strings if they fail.
ich weiß nicht was da falsch ist und ich hab eigentlich auch schon mit anderen älteren datein verglichen...


ciao Jan

Verfasst: 26.12.2004 15:20
von Mario Siebert
Verlink mal deine usercp_register.php als *.txt, in dem Code den du gepostet hast ist kein fehler.

Grüße Mario

Verfasst: 26.12.2004 15:44
von Jan500
ooups außversehen ein doppelt post :-) ....

Verfasst: 26.12.2004 15:44
von Jan500

Verfasst: 26.12.2004 22:08
von Nico Haase
hmm, ich kann da keine fehler entdecken. lad die datei einfach nochmal auf den webspace hoch

Verfasst: 26.12.2004 22:20
von Jan500
hi

grrr :oops: ich hab außversehen in der falschen datei nachgeguckt und auch so euch falsch hochgeladen...ich bin außversehen im falschen ordner gelangt (ins alte forum)...

hier ist der richtige code:
$strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'plz' => 'plz');
$strip_var_list['confirm_code'] = 'confirm_code'

// Strip all tags from data ... may p**s some people off, bah, strip_tags is
// doing the job but can still break HTML output ... have no choice, have
// to use htmlspecialchars ... be prepared to be moaned at.
while( list($var, $param) = @each($strip_var_list) ) {
if ( !empty($HTTP_POST_VARS[$param]) )
{
$$var = trim(htmlspecialchars($HTTP_POST_VARS[$param]));
}
}
was meine frage ist : ist das grüne so richtig? (fehlt da nicht ein ; oder so am ende? oder ist das überahupt so richtig :-D )


das rote ist die besagt zeil 116



ciao Jan

Verfasst: 26.12.2004 22:34
von Jan500
hi

also ich hab jetzt mal das ; am ende hinzugefügt und jetzt funzt es...fehlt denn da noch etwas oder ist das jetzt ok so?

ciao Jan

Verfasst: 26.12.2004 22:34
von Nico Haase
der grüne part ist falsch, da fehlt das ;

Verfasst: 26.12.2004 22:40
von Nico Haase
und jetzt sollte alles klappen!