Update Teilbereich

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Update Teilbereich

    Hallo zusammen,

    Ich habe derzeit auf einer PHP Seite zwei Formulare. Hintergrund ist das ich Uploads im Formular habe.

    Hier die beiden Codes:

    Hier der Bodyanfang:

    Quellcode

    1. <?php
    2. $text = base64_encode(file_get_contents($_FILES['thefile']['tmp_name']));
    3. ?>


    Hier das erste Formular:

    Quellcode

    1. <form name="form1" method="post" action="send1.php" >
    2. <p><img src="gfx/logo.gif" width="322" height="93"></p>
    3. <table width="800" border="0">
    4. <tr>
    5. <td width="93">Customerid:</td>
    6. <td width="144"><input type="text" name="cusid"></td>
    7. <td width="144"> Password:</td>
    8. <td width="144"><input type="text" name="passwd"> </td>
    9. <td width="125">Name:</td>
    10. <td width="126"><input type="text" name="sname"></td>
    11. </tr>
    12. <tr>
    13. <td colspan="2">Faxnumber:</td>
    14. <td><input type="text" name="faxno"></td>
    15. <td>Subject:</td>
    16. <td colspan="2"><input name="subject" type="text" size="40"></td>
    17. </tr>
    18. <tr>
    19. <td colspan="2">Content:</td>
    20. <td><select name="bodytype">
    21. <option value="text/plain">Text</option>
    22. <option value="text/html">HTML Text</option>
    23. <option value="mixed/document">Text and Attachment</option>
    24. </select></td>
    25. <td>confirmation email:</td>
    26. <td colspan="2"><input type="text" name="confirmationurl"></td>
    27. </tr>
    28. <tr>
    29. <td colspan="2">&nbsp;</td>
    30. <td>&nbsp;</td>
    31. <td>Qualit&auml;t</td>
    32. <td colspan="2"><select name="resolution" id="resolution">
    33. <option value="1">Lowres</option>
    34. <option value="2">Highres</option>
    35. </select></td>
    36. </tr>
    37. <tr>
    38. <td colspan="2">Insert your Text here: </td>
    39. <td colspan="4"><textarea name="body" cols="85" rows="7"></textarea></td>
    40. </tr>
    41. <tr>
    42. <td colspan="2"><input name="attach" type="hidden" value=" <?php echo $text ?> "> </td>
    43. <td colspan="2">&nbsp;</td>
    44. <td colspan="2">&nbsp;
    45. </td>
    46. </tr>
    47. <tr>
    48. <td colspan="2">&nbsp; </td>
    49. <td colspan="2">&nbsp;</td>
    50. <td colspan="2"><input type="submit" name="Submit" value="Send the Fax"></td>
    51. </tr>
    52. <tr>
    53. <td colspan="2">&nbsp;
    54. </td>
    55. <td colspan="2">&nbsp;</td>
    56. <td colspan="2">&nbsp;</td>
    57. </tr>
    58. </table>
    59. </form>
    Alles anzeigen


    Hier der Teil für den Upload:

    Quellcode

    1. <form action="" method="POST" enctype="multipart/form-data">
    2. <input name="thefile" type="file" id="thefile">
    3. <input type="submit" name="Submit" value="upload">
    4. </form>


    Meine Frage ist nun wie ich es schaffe das wenn man das Formular ausfüllt, die Daten erhalten bleiben wenn man den Datei Upload gemacht hat. Mir schwirren Begriffe wie IFRAME durch den Kopf, gibt es ne bessere Lösung?

    Matthias
    Das Leben ist binär - du bist eine 1, oder eine 0
  • du willst das formular mit Customer, Name, Fax, Content, ... gar nicht abschicken, sondern erstmal nur das Bild hochladen... und dabei noch im Formular rumwerkeln

    du kannst mal probieren mit nem iframe zu arbeiten

    Quellcode

    1. <iframe name="t"></iframe>
    2. <form action="upload.php" target="t">...<form>


    Aber mit einer aktuellen PHP Version (Stand 11'06) kannst du den UploadStatus sowieso nicht abfragen.
    Mach dir doch lieber ein Popup, indem der Uploadprozess alleine abläuft.
    Also auswählen, starten und automatisches Schließen (self.close()) wenn der Upload beendet ist.
  • Hi!

    Du bist wohl auch immer zur Stelle um zu helfen, oder? Großes Lob mal an der Stelle!

    So, es sieht so aus als hätte ich mich verliebt. Sessions sag ich nur.... grob war mir das bisher ja schon ein Begriff, aber umso mehr ich lese was damit möglich ist .... für den heutigen Abend bin ich erst mal beschäftigt :)

    Grüße,
    Matthias
    Das Leben ist binär - du bist eine 1, oder eine 0