Results 1 to 9 of 9

Thread: Desperate

  1. #1
    Join Date
    Mar 2004
    Location
    Eindhoven, The Netherlands
    Posts
    7,833

    Desperate

    Hello, i am trying to create a webpage that sends a ecard. I have the mail thing working with php but now i am lost on how to attach an image. If anyone could please help i have no idea how anymore...

    Code:
    <?php
    // controleren of de pagina zichzelf heeft aangeroepen. 
    // Zo ja, de e-mail verzenden.
    if (!empty($_POST)){
     
     $bedankt_pagina = "ecards.html";
     // variabelen voor mail() initialiseren. In werkelijkheid nog beveiliging/validatie toevoegen!
     $ontvanger = $_POST["email_vriend"];
     $onderwerp = $_POST["eigennaam"] . " heeft je een e-card gestuurd";
     $bericht = "Je hebt een bericht ontvangen van " . $_POST["eigennaam"] ;
     $bericht .= "(". $_POST["eigen_email"] ."). Hij schrijft het volgende: \n\n";
     $bericht .= $_POST["bericht"];
     $attachment ="ecard1.jpeg";
     // het e-mailbericht verzenden
     if (!mail($ontvanger, $onderwerp, $bericht)){
      echo "Er is een fout opgetreden bij het verzenden van e-mail";
     }
     else{
      // succesvol verzonden, doorsturen naar bedankt-pagina
      header("location:$bedankt_pagina");
     }
    }
    else{
    function mail_attachment ($["email_vriend"], $onderwerp, $bericht, $attachment)
    ?>
    <html>
    <head>
    <title>Voorbeeld 8.2 - vertel een vriend</title>
    </head>
    <body>
    <h1>Verzend je e-card</h1>
    Op deze pagina kun je de e-card bekijken op zijn volledige grootte en kun je hem bovendien versturen door enkele gegevens in te vullen.<p>
    <a href="ecard1.jpeg"><img src="ecard1.jpeg"height=300"></a>
    <hr>
    <form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>">
    Je eigen naam : <input type="text" name="eigennaam"><br>
    Je eigen e-mailadres :<input type="text" name="eigen_email"><br>
    <hr>
    Naam van de ontvanger : <input type="text" name="naam_vriend"><br>
    E-mailadres van de ontvanger : <input type="text" name="email_vriend">
    <p>
    Berichttekst:<br>
    <textarea name="bericht" cols="60" rows="6">
    Hallo, ik heb een email verstuurd vanaf deze pagina:
    http://04025.06sc.thinkquest.nl
     
    Ik denk dat je deze pagina ook wel interessant zult vinden. Groetjes,
    [typ je eigen naam]
    </textarea><br>
    <input type="submit" name="verzenden" value="Verstuur e-mail!">
    </form>
    <?php 
    } // het else-blok afsluiten
    ?>
    </body>
    </html>
    where should i put the attachment tag and how etcetera. it has to be finished by the end of sunday if any translations on the variables names are needed,give me a signal and ill do it. thx in advance,
    a desperate guy needing yet more coffee

  2. #2
    Join Date
    Feb 2004
    Location
    Western Sydney, Australia
    Posts
    11,112
    i would be able to help abit if i could read dutch
    Weekly Quote -

    Dick

  3. #3
    Join Date
    Sep 2004
    Location
    sc,usa
    Posts
    425
    lucky post number 3333 drakkie!

  4. #4
    Join Date
    Aug 2005
    Location
    Somewhere in South America
    Posts
    1,281
    Quote Originally Posted by chris98891
    lucky post number 3333 drakkie!
    Lucky indeed if he manages to get help with the programming...
    Zag when they Zig

  5. #5
    Join Date
    Feb 2005
    Location
    Location: Location: (UK)
    Posts
    2,496
    I honestly didn't know computers would understand more than one language. Maybe this is why they always crash?

  6. #6
    Join Date
    Mar 2004
    Location
    Eindhoven, The Netherlands
    Posts
    7,833
    Quote Originally Posted by whiteballz
    i would be able to help abit if i could read dutch
    dont bother wih the rest, but the variables are:

    $bedankt_pagina = Thank you page
    $ontvanger= receiver
    $onderwerp=subject
    $bericht=message
    eigennaam= own name
    email_vriend=email friend (=receiver )
    naam vriend= name friend
    eigen email= own email.

    if you need anything else post it pls, ill be more than willing to hel p

  7. #7
    Join Date
    Mar 2005
    Location
    Eindhoven
    Posts
    4,059
    I'm afraid I can't help you... although I read dutch
    "The best thing about this is that you know that it has to come from a country where drugs is legal"

    Top Gear on the Vandenbrink Carver One

  8. #8
    Join Date
    Dec 2003
    Location
    nr Edinburgh, Whisky-soaked Scotland
    Posts
    27,775
    I'm back so get me on msn
    "A woman without curves is like a road without bends, you might get to your destination quicker but the ride is boring as hell'

  9. #9
    Join Date
    Mar 2004
    Location
    Eindhoven, The Netherlands
    Posts
    7,833
    Quote Originally Posted by Matra et Alpine
    I'm back so get me on msn
    i figured it out. the email script works and instead of getting a html page in it, i just a simple link to click in it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. a very desperate man....
    By r1ckst4 in forum Miscellaneous
    Replies: 39
    Last Post: 07-07-2005, 05:30 AM
  2. Bowe makes desperate plea
    By fpv_gtho in forum Racing forums
    Replies: 9
    Last Post: 04-16-2005, 08:44 AM
  3. desperate help guys
    By whiteballz in forum General Automotive
    Replies: 1
    Last Post: 08-28-2004, 08:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •