Autor Beitrag
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Fr 29.04.11 18:24 
Hallo Leute,

ich schreibe an einem kleinen Projekt und habe dort auch eine Seite wo man Bilder hochladen kann.

Das Problem ist, dass der Submit-Button nicht funktioniert bzw. nichts passiert wenn man ihn anklickt. Habe deshalb das ganze mal simpel ohne meine Page drumherum getestet und dort funktioniert er.

Hier mal ein Ausschnitt aus meinem upload_formular.php:
ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
<?php
      
      if(isset($_SESSION['valid_user'])) {
      
        include('connect.php');
        
        include('header.html');
        
        echo('<div id="content">');
        
        // Upload Formular
        echo('<h1>Upload...</h1');
        echo('<form action="upload.php" method="post" enctype="multipart/form-data">');
        echo('<p>Galeriename:</p>');
        /*echo('<input type="Text" name="gallery" />');*/
        echo('<input type="File" name="file1" />');
        /*
        echo('<input type="File" name="file2" />');
        echo('<input type="File" name="file3" />');
        echo('<input type="File" name="file4" />');
        echo('<input type="File" name="file5" />');*/
        echo('<input type="submit" value="Bitte" >');
        echo('</form>');
        
        echo('</div>');
        
        include('footer.html');
        
        mysql_close($connection);
      
      }
      else {
        
        include('header.html');
        
        echo('<div id="content">');
        
        echo('<p>Du bist nicht eingeloggt</p>');
        
        echo('</div>');
              
        include('footer.html');
        
      }
      
    ?>


Kann es sein, dass das Formular sich irgendwie stört weil ich Sessions verwende? Das wäre aber auch komisch, ich komme nicht weiter. >.<

Hoffe ihr könnt mir helfen.

Schöne Grüße,
Dude566


Moderiert von user profile iconChristian S.: Topic aus Delphi4PHP-Technologien verschoben am So 15.07.2012 um 13:07

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Fr 29.04.11 19:21 
user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Quelltext
 
12:
13:
{ ... }
        echo('<h1>Upload...</h1');
        echo('<form action="upload.php" method="post" enctype="multipart/form-data">');

;)

Ich würde dir die Firefox-Erweiterung Firebug empfehlen, die dir unter anderem den geparsten HTML-Baum anzeigt. Dort findest du solche Fehler recht leicht.

Für diesen Beitrag haben gedankt: Dude566, Martok
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 29.04.11 19:28 
Und wenn du nicht erst etwas installieren willst, kannst du auch einfach den IE aufmachen und F12 drücken. ;-)
Oder jeden anderen Browser und die Entwicklertools öffnen, z.B. Strg + Shift + I in Chrome. Nur beim FF musst du halt ein Addon installieren.

Für diesen Beitrag haben gedankt: Dude566
Dude566 Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Fr 29.04.11 19:48 
Manchmal ist es doch so einfach... :autsch:

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: So 12.08.12 23:55 
user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Manchmal ist es doch so einfach... :autsch:


Aber dann wäre es doch langweilig :wink:

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.