Tell me if a widget like this exists...

Discussion in 'Web Design and Development' started by jonnysods, Dec 29, 2009.

  1. jonnysods macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
    #1
    I need to place a widget/HTML snippet on an iWeb page that let's you type in your name and your friends email address to send them an invite/coupon, one thati can design.

    I looked around, found some sites that you can create and insert forms etc.

    Any ideas? Have you heard of anything like this?

    Thanks!
     
  2. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
  3. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
    #4
    Link doesn't seem to be available at the moment...
     
  4. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
    #6
    That PHP script is cool. What I would really like to do though is be able to email someone a pdf or create a html coupon so that somebody could email it to a friend.

    This would not allow me to do that. I guess I could point them to where the file is on the website?
     
  5. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
  6. dmmcintyre3 macrumors 68020

    Joined:
    Mar 4, 2007
    #8
    PHP:
    <?php
    $to 
    $_GET['address'];
    $subject "Coupon";
    $body "Your coupon can be downloaded here: http://yoursite.com/downloadcupon.php";
    if (
    mail($tosubject$body)) {
        echo(
    "<p>Message successfully sent!</p>");  
    } else {
        echo(
    "<p>Message delivery failed... Please enter an email address</p>");
    }
    ?>

    HTML:
    <form name="input" action="sendit.php" method="get"> <!-- replace sendit.php with the php script's filename -->
    Email:
    <input type="text" name="address" />
    <input type="submit" value="Submit" />
    </form>
    
     
  7. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
    #9
    Question - I am a complete rookie - how do I get the php script to run on my server?

    :eek: This is how I picture your face right now ;)
     
  8. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again
    #10
    Wow, I just realised how awful that question is.

    I'm working on reading up on it now!
     
  9. ezkimo macrumors regular

    Joined:
    Sep 12, 2002
    #11
    I think you've got some syntax errors.


    PHP:
    <?php
    $to 
    $_GET['address'];
    $subject "Coupon";
    $body "Your coupon can be downloaded <a href='http://yoursite.com/downloadcupon.php'>form here</a>";
    if (
    mail($tosubject$body)) {
        echo(
    "<p>Message successfully sent!</p>");  
    } else {
        echo(
    "<p>Message delivery failed...</p>");
    }
    ?>

    HTML:
    <form name="input" action="sendit.php" method="get">
    Email:
    <input type="text" name="address" />
    <input type="submit" value="Submit" />
    </form>
    
     
  10. dmmcintyre3 macrumors 68020

    Joined:
    Mar 4, 2007
    #12
    Yes, I forgot something. But it did work but it had a subject line showing 'subject'

    Updated script:

    PHP:
    <?php
    $to 
    $_GET['address'];
    $subject "Coupon";
    $body "Your coupon can be downloaded here: http://yoursite.com/downloadcupon.php";
    if (
    mail($to$subject$body)) {
        echo(
    "<p>Message successfully sent!</p>");  
    } else {
        echo(
    "<p>Message delivery failed... Please enter an email address</p>");
    }
    ?>

    HTML:
    <form name="input" action="sendit.php" method="get"> <!-- replace sendit.php with the php script's filename -->
    Email:
    <input type="text" name="address" />
    <input type="submit" value="Submit" />
    </form>
    
    OP: who's your host? MobileMe does not support php if that is your host
     
  11. jonnysods thread starter macrumors 601

    jonnysods

    Joined:
    Sep 20, 2006
    Location:
    There & Back Again

Share This Page