| | | | |
| | |
| Neuer Benutzer Registriert seit: 14.07.2006
Beiträge: 8
![]() | Hallo! Ich habe folgendes Problem: Ein registrierung script mit input form und weitergabe an reg.php--> Nun soll er in eine datei schreiben und diese vorher erstellen, was er eigentlich automatisch macht! Hier mal die scripte: Hoffe doch Scripte publizieren ist erlaubt??!! reg.html //Formular// <---Script Anfang---> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Unbenanntes Dokument</title> <style type="text/css"> <!-- body { background-image: url(image/main.jpg); background-repeat: repeat-y; } .Stil1 { font-family: "Comic Sans MS"; font-weight: bold; font-size: 14px; } .Stil2 { font-family: "Comic Sans MS"; font-size: 12px; } --> </style></head> <body> <form action="user/reg.php" method="get" name="reg" > <table align="center"> <tr><td> <table align="center"> <tr><td> <span class="Stil1">Benutzername*:</span></td> <td><input type="text" name="username" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr><td> <span class="Stil1">Kennwort*:</span></td> <td><input type="text" name="kennwort" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr><td> <span class="Stil1">Kennwortbestätigung*:</span></td> <td><input type="text" name="kennwort2" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr><td> <span class="Stil1">E-Mail Adresse*:</span></td> <td><input type="text" name="e-mail" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr><td> <span class="Stil1">E-Mail Bestätigung*:</span></td> <td><input type="text" name="e-mail2" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr> <td><span class="Stil1">Vorname*:</span></td> <td><input type="text" name="v_name" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr><td> <span class="Stil1">Nachname*:</span></td> <td><input type="text" name="n_name" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <td> <span class="Stil1">Geburtsdatum:</span></td> <td><select name="day"><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option></select> <select name="month"><option>Januar</option><option>Februar</option><option>März</option><option>April</option><option>Mai</option><option>Juni</option><option>Juli</option><option>August</option><option>September</option><option>Oktober</option><option>November</option><option>Dezember</option></select></td></tr> <tr><td> <span class="Stil1">Geburtsjahr:</span></td><td> <input type="text" name="year" value="1900" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td> </tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr><td> <span class="Stil1">Geschlecht:</span></td> <td><input type="text" name="gender" onFocus="this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr><td> <span class="Stil1">Single:</span></td> <td><select name="single"><option>Ja</option><option>Nein</option><option>Ja, zum Glück</option><option>Ja, leider</option></select></td></tr> <tr><td><span class="Stil1">Wohnort:</span></td><td><input type="text" onfocus=" this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" /></td></tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr colspan="2"><td></td></tr><tr> <tr><td> <tr><td><span class="Stil1">Selbstportrait:</span></td><td><textarea type="text" name="self" onfocus=" this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" > </textarea></td></tr> <tr><td><span class="Stil1">Hobbies:</span></td><td><textarea type="text" name="hobbies" onfocus=" this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" > </textarea></td></tr> <tr><td><span class="Stil1">Locations:</span></td><td><textarea type="text" name="locations" onfocus=" this.style.backgroundColor='#CCCCCC'" onBlur="this.style.backgroundColor='#FFFFFF'" > </textarea></td></tr> </table> </td><td> <table align="center"> <tr><td colspan="2"><div align="center"><span class="Stil2">Die mit Sternchen gekennzeichneten Angaben müssen ausgefüllt werden! Mit Klick auf den Button"Weiter-->" kriegst du ein E- Mail zugesendet und kannst dein Account aktivieren!</span></div></td> </tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td colspan="2"></td></tr> <tr><td><span class="Stil1">Mitgliedschaft:</span></td><td><select name="art"><option>Stone Suite Member</option><option>Stone Suite Freund</option></select></td></tr> <tr><td colspan="2"><div align="center"><span class="Stil2">Bist du ein Freund der Stone Suite Admins? Dann melde dich als "Stone Suite Freund" an! Wir prüfen dann, ob du Zugang auf brisante Privatthemen haben darfst!</span></div></td> </tr> <tr> <td colspan="2"><div align="center"><input type="submit" value="Weiter-->" /></div></td></tr> </table> </td></tr></table> </form> </body> </html> <---Script Ende---> //Im Formular sollte meiner Meinung nach auch nix falsch sein!?// reg.php //Auswerung und schreiben in datei// <---Script Anfang---> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Unbenanntes Dokument</title> </head> <body> <? $v_name="$v_name"; $split =" :"; $file = fopen(name.txt,"w+"); fwrite($file,$v_name); fwrite($file,$split); fwrite($file,$n_name); fwrite($file,$split); fwrite($file,$username); fclose($file); $file= fopen(locations.txt,"w+"); fwrite($file,$locations); fclose($file); $file= fopen(hobbies.txt,"w+"); fwrite($file,$hobbies); fclose($file); $file= fopen(self.txt,"w+"); fwrite($file,$self); fclose($file); ?> </body> </html> <---Script Ende---> //Erstellt werden bei diesen Script allerdings die Dateien: - hobbiestxt, locationstxt usw.. - anstatt hobbies.txt, locations.txt Und reinschreiben tu er in die erstellten dateien auch nix außer die variable $split... Wenn ihr eine Vorschau dessen haben wollt Jetzt gerade ist es on unter: https://84.139.243.235/Stone%20Suite/ Unter "Anmeldung" |
| |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [Erledigt] Hochgeladene Datei wird doppelt abgelegt | thecracked | PHP Tipps 2008 | 3 | 01.07.2008 16:31 |
| php cronjob erstellt keine txt-datei... | MrCavity | Server, Hosting und Workstations | 1 | 14.10.2006 15:57 |
| String als Datei speichern | Zangelo | PHP Tipps 2006 | 23 | 25.08.2006 14:13 |
| Komisches problem mit Datei Berechtigungen | stuvomatic | PHP Tipps 2006 | 5 | 28.05.2006 01:49 |
| Datei durchsuchen | Wöllchen | Beitragsarchiv | 3 | 02.03.2006 22:23 |
| [Erledigt] Datei mit &amp;amp;amp;quot;w&amp;amp;amp;quot; schreiben -&amp;amp;amp;gt | PHP-Fortgeschrittene | 17 | 30.12.2005 13:58 | |
| Datei schreibt sich automatisch beim Öffnen des Formulars | PHP Tipps 2007 | 13 | 08.11.2005 09:18 | |
| Ordner Struktur auslesen bestimmte datei finden .... | silverghost | PHP Tipps 2005 | 3 | 24.05.2005 13:55 |
| Includete Datei nicht gleich ausgeben | Madden | PHP-Fortgeschrittene | 1 | 12.05.2005 00:19 |
| Ordner erstellen und Datei uploaden | Juuro | PHP Tipps 2005 | 6 | 20.01.2005 21:18 |
| xfdf Datei mit PHP an eMail senden Problem: Leere Datei | PHP Tipps 2004-2 | 1 | 07.12.2004 12:25 | |
| [Erledigt] datei editieren | PHP Tipps 2004 | 1 | 10.09.2004 20:33 | |
| (ich schonwieder) Link seite automatisch | imported_DJ Nuno | PHP Tipps 2004 | 14 | 19.08.2004 17:42 |
| Wie kann ich eine PHP Datei in eine HTML Datei umwandeln | PHP Tipps 2004 | 2 | 12.08.2004 18:04 | |
| [Erledigt] Datei löschen bzw. umbenennen | PHP Tipps 2004 | 3 | 05.08.2004 06:45 | |
| Besucher kamen über folgende Suchanfragen bei Google auf diese Seite |
| fwrite schreibt leere datei, php fwrite schreibt nicht in leere datei, php fwrite leere datei, onblur in php datei, <body style=\background-color:#cccccc\> center, von php erstellte dateien falsch, <textarea onfocus font-family:, php onfocus this.style.backgroundcolor, php schreibt dateien falsch, fwrite erstellt leere datei, http://www.php.de/php-tipps-2006/42030-php-erstellt-datei-falsch-und-schreibt-nicht-ind-die-datei.html |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.