This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Can data be sent directly through email and not inserted into database?


  1. franki
    Member

    I understand a database is necessary to install machform, but is there a way to not store form information and just have it sent in email?

    Thanks

    Posted 16 years ago #
  2. yuniar

    Edit your includes/post-functions.php file, on line 1008 you'll find these:

    do_query($query);
    $record_insert_id = mysql_insert_id();

    remove the first line above and your submission won't be saved to your database.


    MachForm Founder

    Posted 16 years ago #
  3. franki
    Member

    Thanks yuniar! Great product you have here! :)

    Posted 16 years ago #
  4. franki
    Member

    So I commented out do_query($query); and it does keep the information out of the database, but the email comes in totally blank except for the Powered By Machform which is all that I see there. Also the "Your Users" email doesn't come through at all. I tried using different email addresses and things but not a clue really what the problem is. Any ideas I can try?

    Thanks.

    Posted 16 years ago #
  5. AMurray
    Pro Member

    Have you set up the email option correctly e.g. to use an SMTP server (specify the server name and creditentials etc) or the inbuilt "send mail" of PHP?

    You need to change the option in config.php

    Posted 16 years ago #
  6. franki
    Member

    Hmm.. Well I'm not sure if I need to change anything there because the email and everything else works perfectly until I take that piece code away (sorry I didn't indicate this before). After that the email has the issues I described. Do I need to change anything there now?

    Thanks

    Posted 16 years ago #
  7. yuniar

    oops.. sorry, my bad.

    the above hack seems to work fine for version 1.2 only.
    Ok, please disregard the above hack and restore your original post-functions.php file.

    Then try this, around line 1170 you'll find this code:

    $process_result['status'] = true;

    right below that line, add this code:

    do_query("truncate table ap_form_{$form_id}");

    that should be working fine.

    PS. This hack assume you have "form review" disabled.


    MachForm Founder

    Posted 16 years ago #
  8. susanfw
    Member

    I would like to use the above hack as well, but have it apply to only one form that would have private emails. The other form results I want to go into the database. Is that possible?

    Posted 15 years ago #
  9. yuniar

    Yes, that is possible.
    Let say you have a form with id number = 7

    Change the above code with this one:

    if($form_id == 7){
       do_query("truncate table ap_form_{$form_id}");
    }

    MachForm Founder

    Posted 15 years ago #
  10. susanfw
    Member

    Thank you. I'll give it a try.

    Posted 15 years ago #

RSS feed for this topic

Reply