| | | | |
| | |
| Gast
Beiträge: n/a
| HioH Leutz Jetzt hab ich n Problem mit meinem Anmeldungs formular. und zwar werden von "formular.php" zu "auswertung.php" die Variablen nicht übertragen. Wer sich die Mühe machen will und die beiden langen scripte sich anschauen will, dem wäre ich sehr dankbar. Es kommt auf den unteren Teil der scripte an !!! Code: /// formular.php /// <html> <head> <title></title> </head> <body text="#FFFFFF" bgcolor="#C0C0C0" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF"> <?php $Datenserver="localhost"; $user="lionhair"; $pass=""; $verbindung = mysql_connect($Datenserver, $user, $pass); $dbname= "db_local"; $d=mysql_select_db($dbname, $verbindung); $sql ="SELECT * FROM login"; $ergebnis= mysql_query($sql,$verbindung); $zeile = mysql_num_rows($ergebnis); echo"<div align='center'><table width='960' height='20%'>"; echo"<tr>"; echo"<td>"; echo"<div align='center'>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#928D89' width='100%' height='100%'>"; echo"<tr>"; echo"<td>"; echo" </p>"; echo"<div align='center'> [img]Banner.jpg[/img]</p></div>"; echo" </p></td>"; echo"</tr>"; echo"</table>"; echo"</div>"; echo"</td>"; echo"</tr>"; echo"</table></div>"; echo" "; echo"<table width='100%' height='45%'>"; echo"<tr>"; echo"<td width='34%'VALIGN='top'>"; echo"<center><table border='1' cellpadding='0' cellspacing='0' bgcolor='#494949' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'><u>Login</u></div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='15%'>"; echo"<tr>"; echo"<form action='session.php' method='post' name='login'>"; echo"<td>Username:</td>"; echo"<td><input type='text' name='user1' size='35'></td>"; echo"</tr>"; echo"<tr>"; echo"<td>Passwort:</td>"; echo"<td><input type='password' name='password1' size='35'></td>"; echo"</tr>"; echo"<tr>"; echo"<td><div align='center'><input type='submit' value='Login' name='loginr'></div></form></td>"; echo"<form action='formular.php' name='anmelden'>"; echo"<td><div align='center'><input type='submit' value='Anmelden' name='anmeldung'></div></form></form></td>"; echo"</tr>"; echo"</table>"; echo" </p>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#494949' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'><u>Menü</u></div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'>Home</div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'>Pics</div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'>Kontakt</div></td>"; echo"</tr>"; echo"</table></center>"; echo"</td>"; echo"<td VALIGN='top'>"; echo"<form action='auswertung.php' method='post'>"; echo"<center>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#494949' width='490' height='5%'>"; echo"<tr >"; echo"<td><div align='center'><u>Anmeldung</u></div></td>"; echo"</tr>"; echo"</table>"; echo"<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bgcolor='#B4B0AD' width='490' height='80%'>"; echo"<tr>"; echo"<td align=\"right\">Username:</td>"; echo"<td>"; echo"<input name=\"Username\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">Vorname:</td>"; echo"<td><input name=\"Vorname\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">Nachname:</td>"; echo"<td>"; echo"<input name=\"Nachname\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">Straße:</td>"; echo"<td><input name=\"Straße\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">PLZ:</td>"; echo"<td><input name=\"PLZ\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">Ort:</td>"; echo"<td><input name=\"Ort\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">E-Mail Adresse:</td>"; echo"<td><input name=\"Mail\" type=\"=text\" size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo"<tr>"; echo"<td align=\"right\">Passwort:</td>"; echo"<td><input name=\"Passwort\" type='password' size=\"30\" maxlength=\"30\"></td>"; echo"</tr>"; echo "</table></center>"; echo" </p>"; echo"<center><table>"; echo"<tr>"; echo"<td><input type='Submit' name='weiter' value='Weiter'></td>"; echo"</form>"; echo"<form action=\"index.html\" method='post'>"; echo"<td><input type='Submit' name='zrueck' value='Zurück'></td>"; echo"</form>"; echo"</tr>"; echo"</table></center>"; echo"</td>"; echo"</tr>"; echo"</table>"; echo"</p>"; ?> </body> </html> Code: /// auswertung.php /// <html> <head> <title></title> </head> <body text="#FFFFFF" bgcolor="#C0C0C0" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF"> <?php $Datenserver="localhost"; $user="lionhair"; $pass=""; $verbindung = mysql_connect($Datenserver, $user, $pass); $dbname= "db_local"; $d=mysql_select_db($dbname, $verbindung); $sql ="SELECT * FROM login"; $ergebnis= mysql_query($sql,$verbindung); $zeile = mysql_num_rows($ergebnis); echo"<div align='center'><table width='960' height='20%'>"; echo"<tr>"; echo"<td>"; echo"<div align='center'>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#928D89' width='100%' height='100%'>"; echo"<tr>"; echo"<td>"; echo" </p>"; echo"<div align='center'> [img]Banner.jpg[/img]</p></div>"; echo" </p></td>"; echo"</tr>"; echo"</table>"; echo"</div>"; echo"</td>"; echo"</tr>"; echo"</table></div>"; echo" "; echo"<table width='100%' height='45%'>"; echo"<tr>"; echo"<td width='34%'VALIGN='top'>"; echo"<center><table border='1' cellpadding='0' cellspacing='0' bgcolor='#494949' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'><u>Login</u></div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='15%'>"; echo"<tr>"; echo"<form action='session.php' method='post' name='login'>"; echo"<td>Username:</td>"; echo"<td><input type='text' name='user1' size='35'></td>"; echo"</tr>"; echo"<tr>"; echo"<td>Passwort:</td>"; echo"<td><input type='password' name='password1' size='35'></td>"; echo"</tr>"; echo"<tr>"; echo"<td><div align='center'><input type='submit' value='Login' name='loginr'></div></form></td>"; echo"<form action='formular.php' name='anmelden'>"; echo"<td><div align='center'><input type='submit' value='Anmelden' name='anmeldung'></div></form></form></td>"; echo"</tr>"; echo"</table>"; echo" </p>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#494949' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'><u>Menü</u></div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'>Home</div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'>Pics</div></td>"; echo"</tr>"; echo"</table>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#B4B0AD' width='303' height='5%'>"; echo"<tr>"; echo"<td><div align='center'>Kontakt</div></td>"; echo"</tr>"; echo"</table></center>"; echo"</td>"; echo"<td VALIGN='top'>"; echo"<form action=\"auswertung.php\" method='post'>"; echo"<center>"; echo"<table border='1' cellpadding='0' cellspacing='0' bgcolor='#494949' width='490' height='5%'>"; echo"<tr >"; echo"<td><div align='center'><u>Anmeldung</u></div></td>"; echo"</tr>"; echo"</table>"; echo"<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bgcolor='#B4B0AD' width='490' height='80%'>"; echo"<tr>"; echo"<td>Username :$Username</td>"; echo"</tr>"; echo"<tr>"; echo"<td>Vorname :$Vorname</td>"; echo"</tr>"; echo"<tr>"; echo"<td>Nachname :$Nachname</td>"; echo"</tr>"; echo"<tr>"; echo"<td>Straße :$Straße</td>"; echo"</tr>"; echo"<tr>"; echo"<td>PLZ :$PLZ</td>"; echo"</tr>"; echo"<tr>"; echo"<td>Ort :$Ort</td>"; echo"</tr>"; echo"<tr>"; echo"<td>E-Mail Adresse :$Mail</td>"; echo"</tr>"; echo"<tr>"; echo"<td>Passwort :$Passwort</div></td>"; echo"</tr>"; echo"</table>"; mysql_query("CREATE TABLE $Username ( user VARCHAR(10) NOT NULL PRIMARY KEY, password VARCHAR(28) NOT NULL, session VARCHAR(28) )"); $eintrag="INSERT INTO $Username (user, password, session) VALUES ('$Username', '$Passwort', NULL)"; $eintragen= mysql_query($eintrag); $eintrag2 = "INSERT INTO login (Username, Vorname, Nachname, Straße, PLZ, Ort, Mail, Passwort) VALUES ('$Username', '$Vorname', '$Nachname', '$Straße', '$PLZ', '$Ort', '$Mail', '$Passwort')"; $eintragen2 = mysql_query($eintrag2); echo"<table>"; echo"<tr>"; echo"<td>"; echo"<form action='formular.php'>"; echo"<div align=\"center\"><input type=\"submit\" value=\"Angaben ändern\"></form></td>"; echo" "; echo"</p>"; echo"<td><form action=\"bestaetigung.php\">"; echo"<div align=\"center\"><input type=\"submit\" Value=\"Anmelden\"></form></td>"; echo"</tr>"; echo"</table>"; echo"</td>"; echo"</tr>"; echo"</table>"; echo"</p>"; ?> </body> </html> MFG Mamagotchi |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Gast
Beiträge: n/a
| also bei einem form-tag fehlt method... http://de.php.net/register_globals du musst die Superglobals $_POST, $_GET etc. benutzen |
| | |
| Gast
Beiträge: n/a
| da steht doch method='post' wo es nötig ist. dat komische ist dat bei meiner alten seite (http://mitglied.lycos.de/aol2004/die Anmeldung funzt und ich hab sie nur angepasst (die scripts). |
| | |
| Gast
Beiträge: n/a
| du wohl auch nicht. schon mal meine alte Seite http://mitglied.lycos.de/aol2004/ gewesen ??? Da funzt der script und ich hab es nur an mein neues "design" ( ich weiß das es scheiße aussieht) angepasst. |
| | |
| Gast
Beiträge: n/a
| zeile 45 bis ein paar danach: PHP-Code: wenn ich das richtig überflogen habe, hast du allgemein 4 formulare in der ersten datei geöffnet, aber nur 2 geschloßen. und so nebenbei: du kannst den php teil auch oben wieder schließen nachdem du die vars dort definiert hast. is übersichtlicher. weil ich glaub die, brauchst in dem teil net weiter. bidde berichtigt mich wenn es anders is. aber den code kann man echt nur überfliegen und net komplett analysieren. smilli |
| | |||
| Gast
Beiträge: n/a
| Zitat:
aber es gab schon 100 mal die frage: Zitat:
naja die phpinfo() wird aufschluss bringen... | ||
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Statistik Script Referrer Problem | 7Style | PHP Tipps 2008 | 28 | 01.07.2008 15:14 |
| Problem mit php script | Jelko | PHP Tipps 2008 | 2 | 19.08.2007 23:28 |
| Problem bei Dateidownload via PHP Script | niffi | PHP-Fortgeschrittene | 7 | 01.06.2007 19:39 |
| Problem mit einem Script wo ich ned weiterkomme | MatthiasNI | PHP Tipps 2006 | 3 | 14.10.2006 17:35 |
| Problem mit einem Script | PHP Tipps 2007 | 7 | 28.11.2005 16:37 | |
| Problem mit Login Script | PHP Tipps 2007 | 4 | 15.11.2005 17:29 | |
| mal funktionierts, mal nicht - großes Problem mit PHP Script | nicobischof | PHP Tipps 2005-2 | 5 | 01.10.2005 16:13 |
| Problem mit Bilder einfügen Script | PHP Tipps 2005-2 | 3 | 21.07.2005 00:28 | |
| problem mit login script | PHP Tipps 2005 | 26 | 20.05.2005 22:10 | |
| [Erledigt] PHP Script Problem | PHP Tipps 2005 | 12 | 06.01.2005 12:38 | |
| Problem mit einem Bildergallery Script (Strato Problem???) | sharky | PHP Tipps 2007 | 9 | 05.01.2005 11:00 |
| Termin Script Problem | PHP Tipps 2004 | 16 | 16.08.2004 08:35 | |
| Problem beim Upload mehrerer Dateien per Script | PHP Tipps 2004 | 1 | 04.08.2004 16:26 | |
| Script Problem: parse error unexpected $end | PHP Tipps 2004 | 5 | 02.08.2004 13:25 | |
| delete script problem | PHP Tipps 2004 | 5 | 23.07.2004 14:39 | |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.