El-Diablo: PHP oder Javascript / Ich suche eine Lösung

Beitrag lesen

hallo,

Die Lösung des Problems wäre ja eigentlich beim Ändern Button eine "onClick" Aktion zu erstellen. Aber php lässt sich in diesem Falle nicht anwenden, oder?

Doch, natürlich. Du mußt ja auch für das "readonly" bereits unterschiedliche Funktionen gebaut haben, eventuell über Parameter. Was hindert dich daran, eine weitere Funktion mit anderen Parametern zu bauen?

Aber dann müsste ich es einrichten das eine PHP-Variable beim "onClick" definiert wird und das geht doch nicht!? Weil PHP wird ja schon vor dem Laden der Seite aufgerufen.

=============================================================== <FORM action= <? if ( strlen($Benutzername) > 3) { if ( strlen($Passwort_1) > 1) { if ( strlen($Passwort_2) > 1) { if ($Passwort_1==$Passwort_2) { if ( strlen($Email) > 1) { echo "Fertig.php"; } } } } } else echo "Registration.php"; ?>  method=post NAME=Registration> <TABLE> <TR> <TD>Benutzername:</TD> <TD COLSPAN=3><INPUT NAME=Benutzername SIZE=15 MAXLENGTH=15 <? if ( strlen($Benutzername) > 3) { echo "value=" . $Benutzername . " CLASS=Bereich readonly> &#160;<INPUT TYPE=Submit NAME=Submit[1] VALUE=Ändern></td>"; } else echo "></td>"; ?> <td></td> </TR> <tr> <td>Passwort:</td> <td colspan=3><INPUT TYPE="Password" NAME="Passwort_1" SIZE=15 MAXLENGTH=15 <? if ( strlen($Passwort_1) > 1) { if ($Passwort_1==$Passwort_2) { echo "VALUE=" . $Passwort_1 . " CLASS=Bereich readonly> &#160;<a href=>Ändern</a>"; } else echo "></td><td>Passwort eingeben!</td>"; } ?> </tr> <tr> <td>Passwort bestätigen:</td> <td colspan=3><INPUT TYPE="Password" NAME="Passwort_2" SIZE=15 MAXLENGTH=15 <? if ( strlen($Passwort_2) > 1) { if ($Passwort_2==$Passwort_1) { echo "VALUE=" . $Passwort_2 . " CLASS=Bereich readonly>"; } } ?> <td></td> </tr> <TR> <TD>E-Mail:</TD> <TD COLSPAN=4><INPUT NAME="Email" SIZE=30 MAXLENGTH=35 <? if ( strlen($Email) > 1) { echo "value=" . $Email . " CLASS=Bereich readonly> &#160;<a href=>Ändern</a></td>"; } else echo "></td>"; ?> </TR> <TR> <TD COLSPAN=5><INPUT TYPE=SUBMIT NAME="Submit[0]" CLASS="Button" VALUE= <? if (isset($Submit[0])) { echo "Bestätigen"; } else echo "Absenden"; ?>><INPUT TYPE=RESET CLASS="Button" VALUE="Abbrechen" onClick="history.back()"></TD> </TR> </TABLE> </FORM>

Ich hab den Quelltext mal stark gekürtzt aber er dürfte mein Problem gut darstellen. Mal kurz eine andere Frage. Kann man das Attribut "readonly" direkt in CSS einbinden?