Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: php email? rep+

  1. #21
    Join Date
    Jan 2010
    Posts
    3,641
    Tokens
    138

    Latest Awards:

    Default

    Quote Originally Posted by Dave. View Post
    change your form to

    HTML Code:
    <form action="write.php" method="POST">
    then make a new php file called write.php with this in it

    PHP Code:
    <?php

    $file 
    "./name.txt";
    $write $_POST['name'] . "\n";

    file_put_contents($file$writeFILE_APPEND);

    ?>
    should create a file called name.txt with whatever people input, keep previous entries and set a new line
    is it possible to display that on a .html file?

  2. #22
    Join Date
    Oct 2006
    Posts
    9,900
    Tokens
    26,832
    Habbo
    Zak

    Latest Awards:

    Default

    The mail() function doesn't support SMTP authentication, so most mail servers will reject mail from sources they don't recognize.
    In regards to my earlier post. This could be the error? Seen as though some of the provided solutions would work.

    The php mail function itself is just a pain.

    -----------------------------------------------

    At the post above, it is possible to display it in the same document. Make sure it's saved as a .php file, put the php code in between the <head> </head> tags. Then put your form in the <body> </body> tags.

    That's what i do anyway, although I've just started learning PHP. Done like a login, register, members area and admin panel in a day. Super easy to learn, especially when I usually have to do Java.
    Last edited by Zak; 13-11-2011 at 06:02 PM.

  3. #23
    Join Date
    Aug 2010
    Location
    Glasgow
    Posts
    7,144
    Tokens
    2,757

    Latest Awards:

    Default

    Quote Originally Posted by Thomas View Post
    is it possible to display that on a .html file?
    yeah just change it to whatever.html

    PHP Code:
    $file "./filename.html"

  4. #24
    Join Date
    Jan 2010
    Posts
    3,641
    Tokens
    138

    Latest Awards:

    Default

    Quote Originally Posted by Dave. View Post
    yeah just change it to whatever.html

    PHP Code:
    $file "./filename.html"
    This might be getting too hard but is there anyway you can put a check box next to each name and you can tick it and click delete and it removes it from the html file. Thats the last think i'd need doing

    also:
    Warning file_put_contents(./admin.html) [function.file-put-contents]: failed to open stream: Permission denied in /opt/lampp/htdocs/join/write.php on line 6
    Last edited by Thomas; 13-11-2011 at 06:14 PM.

  5. #25
    Join Date
    Oct 2006
    Posts
    9,900
    Tokens
    26,832
    Habbo
    Zak

    Latest Awards:

    Default

    Quote Originally Posted by Thomas View Post
    This might be getting too hard but is there anyway you can put a check box next to each name and you can tick it and click delete and it removes it from the html file. Thats the last think i'd need doing
    That so confused me on what you're trying to do

    If I wanted the names storing I would use an SQL database upon clicking submit or send or w.e it stores the name. Then have an additional button maybe in the admin panel to delete records from that table. Or you could just delete records manually in phpmyadmin.

    That's more than likely not what you wanted to do but hey ho. I think this is getting way too overcomplicated for a simple mail function

  6. #26
    Join Date
    Nov 2011
    Posts
    67
    Tokens
    0

    Default

    I don't get it ! I have the same problem !

    ---------- Post added 13-11-2011 at 08:39 PM ----------

    www.habbtunez.com/jobs/ It doesnt send !



    <?php
    $to = "jobs[@]@habbtunez.com"[/@]; // The email address to send the message to.
    $body ="Message here " . $_POST['textboxname']; //The body of our message. Separate lines with "\n".
    $body =wordwrap($body,70); // 70 Chars per line
    $subject = "Job Application"; //The subject of our message.
    mail($to, $subject, $body); //Send the message
    ?>

Page 3 of 3 FirstFirst 123

Posting Permissions

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