Help! > How to send a dynamic HTML table as an email?

Hello


I want to send a dynamic html table as an email


I'm using php/mysql and I have a mysql database


I have a table dynaimc restrained some data from the database


I have a form with a text box to write the email and a button "submit"


I want to send the picture (or the information in the table) when I send the form


is this possible?


Help, please!

OK, now I have you.  You create a queary to select the data you want, and then copy the following code

$data = mysqli_query ($dbc, $query) or die (mysqli_error ($dbc));

While ($row = {mysqli_fetch_array ($data))}

Mail to the owner of the form

$header = "from: [email protected]\n".

. "Reply-To: $email\n";

$subject = 'DB in emails data';

$email_to = "[email protected]";

$message =

$row ["FirstName"].

$row ['last_name']

;

}

mail ($email_to, $subject, $message, $header);

So, for each column, you will enter in this

$row ["FirstName"].

So if the column reported, you would put

$row ["State"].

I hope this is the answer you are looking for.

Gary

Tags: Dreamweaver

Similar Questions

  • How to send a complete HTML, dynamic PHP page using phpmail()?

    How to send a complete HTML, dynamic PHP page using PHP Web site phpmail(), similar to the post this page or send the link to a friend?

    How to send a complete HTML, dynamic PHP page using PHP Web site phpmail(), similar to the post this page or send the link to a friend?

  • How to convert/parse an html table

    Hello

    I have a string containing an html table code...

    < table >

    < b >

    < td > 1 < table > column

    < td > column 2 < table >

    < td > 3 < table > column

    < /tr >

    < b >

    Row1Value1 < td > < table >

    Row1Value2 < td > < table >

    Row1Value3 < td > < table >

    < /tr >

    ... etc...

    < /table >

    Actually I would like to have the contents of the table in a query (like this) in an xml structure or in a CF structure or in a table or whatever. I tried to do with XMLParse but I have not it - I'm not understand DTDS or what ever he needs.

    Is there a simple way for a beginner like me?

    Thank you very much!

    From here all you have to do to get the 3 values of Word; number, is to treat the string as one | delimited list.

  • Dynamic html table

    Hello
    I try to make a dynamic array that will return the topics, all rows in the emp table. Let's say I made the process on the page what contect back simple table.

    -The processes on the laundry after region-
    DECLARE
    totalRows INT;
    Str VARCHAR2 (300);

    CURSOR c_emp
    IS
    SELECT ename, empno, mgr
    EMP;
    BEGIN
    HTP.p ("< table style =" border: 1px solid; ' > ' ");

    I'm IN c_emp
    LOOP
    HTP.p ("< tr >");
    HTP.p ("< style td =" border: 1px solid black; "> ' |") i.EmpNo | "< table >');
    HTP.p ("< style td =" border: 1px solid black; "> ' |") i.Ename | "< table >');
    HTP.p ("< style td =" border: 1px solid black; "> ' |") i.Mgr | "< table >');
    HTP.p ("< /tr >");
    END LOOP;

    HTP.p ("< /table >");
    END;
    -----------------------------------------------------------------------------------------------------

    How to include the titles of the columns dynamically? And how to make more intelligent?

    Thx for the help and good ideas!

    Hello

    An example

    DECLARE
      l_cursor  INTEGER := dbms_sql.open_cursor;
      l_qry     VARCHAR2(32000);
      l_status  NUMBER;
      l_cvalue  VARCHAR2(32000);
      l_col_cnt NUMBER;
      l_desc_t dbms_sql.desc_tab2;
      l_desc_c dbms_sql.desc_tab;
    BEGIN
      l_qry := 'SELECT * FROM emp';
      dbms_sql.parse (l_cursor, l_qry, dbms_sql.native);
      dbms_sql.describe_columns( l_cursor, l_col_cnt, l_desc_c );
      htp.p('');
      htp.p('');
      htp.p('');
      FOR i IN 1 .. l_desc_c.count
      LOOP
        NULL;
        htp.prn('');
      END LOOP;
      htp.p('');
      htp.p('');
      htp.p('');
      dbms_sql.describe_columns2( l_cursor, l_col_cnt, l_desc_t );
      --
      FOR i IN 1 .. l_desc_t.count
      LOOP
        dbms_sql.define_column( l_cursor, i, l_cvalue, 32765);
      END LOOP;
      l_status := dbms_sql.execute( l_cursor );
      LOOP
        EXIT
      WHEN (dbms_sql.fetch_rows( l_cursor ) <= 0 );
        --l_row_cnt      := l_row_cnt + 1;
        htp.p('');
        FOR i IN 1 .. l_desc_t.count
        LOOP
          dbms_sql.column_value( l_cursor, i, l_cvalue );
          htp.prn('');
        END LOOP;
        htp.p('');
      END LOOP;
      htp.p('');
      htp.p('
    ' || l_desc_c(i).col_name || '
    ' || l_cvalue || '
    '); IF dbms_sql.is_open(l_cursor) THEN dbms_sql.close_cursor(l_cursor); END IF; EXCEPTION WHEN OTHERS THEN IF dbms_sql.is_open(l_cursor) THEN dbms_sql.close_cursor(l_cursor); END IF; RAISE; END;
  • Need help to create a scrollbar in HTML table

    Hello dreamweavers!

    I need help here please...

    I need to create a table with three columns... or a webpage... that has the ability to scroll when things are added.


    This is a music site and page Web will be a list - a database of all sorts - of each title artist and album. If there are say, 200 titles in the catalog, then I need to list them all on one page and in 3 columns towards the bottom of the page. What I did using a table in HTML in Dreamweaver. The problem is each title on the table is static and when adding in a new title in the catalog, ALL securities will have to be moved manually. So, I need to create a table where when I add another title (they will be alphabetical) say to am' for example, then all of the other titles will be automatically moves along a (somewhat as in a Word document by adding a new line). Everything else is automatically shifted. I don't know if this is still possible in Dreamweaver?

    I hope that I have explained this correctly. It's quite a strange problem, and as such, I have been unable to find anything on this forum or google search.
    If anyone can help that would be most excellent! I'd be happy.

    Questions - if you need further information please ask

    I use Dreamweaver CS5.5 Version 11.5 Build 5315

    I have a Macbook Pro with Snow Leopard if that's at all relevant.

    My site is on Wordpress with the theme, Suffusion. I can link to it, if someone needs.

    Here is a picture of the table, as I did, to give an idea what it looks like:

    columns.jpg

    Thank you!

    P.I.G > /.

    big dreamers never sleep

    Mylenium was right. You must use a database for this server-side.

    Maintenance of static tables with this amount of data is going to be a logistical nightmare - not even worth considering.   Get an indexing plugin for WordPress.

    Nancy O.

  • JSON data in HTML table

    I'm new to jQuery, animate edge and this Forum... and pretty novice to HTML5 and CSS3, so I could really use a help please :-)

    I have a JSON file with many records.  I wish that each record to represent a row in an html table.  The JSON file gets written each night courses, and the number of records in the JSON file will often change.  I want to write the values of the file in a dynamic html table and then use different animations to set the table on the stage!  Possible?  Or is there a better way?

    My JSON example:

    [{'id': 1,}]

    'Division': 'Austin ',.

    'txt_one': 9,.

    'txt_two': 5,.

    'txt_three': 20,.

    "txt_four": 5

    },

    {"id": 2}

    'Division': 'Houston ',.

    'txt_one': 0,

    "txt_two": 4.

    'txt_three': 0,

    'txt_four': 7

    },

    {"id": 3}

    "Division':"Phoenix. "

    'txt_one': 1,.

    'txt_two': 2.

    "txt_three": 3.

    "txt_four": 6

    }]

    (1) the html option (table symplistic).

    (A) code:

    var myList = {lines: []}

    {'id': 1, 'Division': 'Austin', 'txt_one': 9, "txt_two": 5, "txt_three": 20, "txt_four": 5},

    {'id': 'Division' 2: "Houston", "txt_one": 0, "txt_two": 4, "txt_three": 0, "txt_four": 7},.

    {'id': 3, 'Division': 'Phoenix', 'txt_one': 1, 'txt_two': 2, 'txt_three': 3, 'txt_four': 6}

    ]};

    var lines ="";

    .each $(myList.rows, {function(index,item)}

    "lines += '.'+' + item.id"+ point. "Division.'+ item.txt_one +''+ item.txt_two +''+ item.txt_three +''+ item.txt_four +'";

    } );

    .html ("$("Text") sym.

    "+ lines +".
    ");

    SYM. $("table") .css ("width", sym.$("Text").width ());

    SYM. $("table, td") .css ({'border': "1px solid black", "border-spacing": "5px"})

    SYM. $("tr") .css ("background", "#acc5a0");

    SYM. $("td") .css ("text-align", "center") .css ("color", "white");

    (B) back on stage:

    (2) the display option.

    Could you please send a file with your model of symbol?

    I mean your line template.

  • How send the beautiful html email I did I DW?

    Hello

    I designed a reagent html email in Dreamweaver and tested in different browsers, iPhone, iPad etc. It looks great and I'm happy. But now I want to send it but can't! OM my mac I open the e-mail-html-page in Safari and select "send as e-mail". It opens the html email in a new email, and everything is on a line to the left. It looks like this:

    "

    T

    h

    I have

    s

    I have

    s

    m

    There

    t

    e

    x

    t

    ..."

    I have on my PC, in Outlook, create a new mail and import html pages and here everything is also to the left (but not all of the letters as on my mac". It looks NOT like when I tested it in different browsers.

    I also tried to send the sensitive default html email template in Dreamweaver (without changing anything in it), but it also lined up left by the post.

    So, now, when I created an email reagent butiful in dreamweaver. How to send?

    Thank y

    AI

    Make an HTML email is not the same as doing a Web page. Remove or ignore certain code (like most many email clientsthe elements and embedded CSS). You may have created a nice page that works correctly across the browser, but will never properly work at several mail clients. It depends on your code.

    Some things that can help you...

    1. use provisions of base tables. I know, it sounds bad, but put in simple nested table based much more systematically appear cross-client in html emails
    2. use simple inline css if you cannot use an html attribute to do the same. Nothing should be in theof the page, it gets deleted by several email clients. A lot of css attributes does not work, so if there is an equivalent html element, we it rather
    3. a lot of text html, few images. Most e-mail clients are set to block images by default. If your email is image heavy, you can not reach everyone with something other than a message "for security reasons, the images were downloaded not."
    4. do not send yourself if you have a large list, you will get your email blacklisted as a spammer. Use an email like constantcontact.com and icontact.com service if you have a list of more than maybe 100-200 addresses

    There are other items that need to be addressed, but who are the biggest. Electronic messaging services have you can use models that have been tested and refined for better results across a broad band of email clients. Until you have the 'tutorials' of html emails down, it may be preferable to use the available templates prior to the layout yourself.

  • Manual large editions with sensitive html setting. Is there a way to determine how the entries appear in the table of contents?

    I publish major textbooks with sensitive html setting. Is there a way to determine how the entries appear in the table of contents? If I publish a small section of the manual then 2nd level entries appear as eruptions under the chapter name, but if I publish the manual in its entirety then level 2 headings are not at all. I would like them to appear as the eruptions in the table of contents, but I need to publish the manual as a whole in order to keep the cross references. Any help will be greatly appreciated!

    I think that this would make clearer - and it would skip and tables of contents of books under.

  • How can I filter the data and display it in the html table?

    Hello

    How do I filter data that contains the database table and already displayed in html table, then when the user write a data to filter or search, it will automatically display the data in html table. ?

    can someone help me to do this? Here is my php code for the table that will display the data:

    <?php
      $servername = "localhost";
      $username = "root";
      $password = "pass";
      $dbname = "ses";
       
       
      // Create connection
      $conn = new mysqli($servername, $username, $password, $dbname);
      // Check connection
      if ($conn->connect_error) {
      die("Connection failed: " . $conn->connect_error);
      }
       
      $sql = "SELECT No, Calon, ID, Jurusan FROM candidates";
    
      $result = $conn->query($sql);
      ?>
    
    <?php
      if ($result->num_rows > 0) {
      echo "<table >
    
      <tr>
      <th>NO</th>
      <th>Candidate</th>
      <th>ID Number</th>
      <th>Programme</th>
      <th>Edit</th>
      <th>Delete</th>
      </tr>";
      // output data of each row
      while($row = $result->fetch_assoc()) {
      echo "<tr>
      <td align='center'>" . $row["No"]. "</td>
      <td>" . $row["Calon"]. "</td>
      <td>" . $row["ID"]. " </td>
      <td>" . $row["Jurusan"]. "</td>
      <td align='center'><a href='main2.php?edit=".$row["No"]."'>Edit</a></td>
      <td align='center'><a href='delete.php?del=".$row["No"]."'>Delete</a></td>
      </tr>";
      }
    
      echo "</table>";
      } else {
      echo "0 results";
      }
      $conn->close();
      ?>
    

    hope someone can help me with this.

    Thank you.

    You must first create a search form for the user to enter a search word:

    Then create a page named search_page.php and insert the following code into it and save it. The code in red below Gets information from the search form field name = "Calon" and the SQL query finds in the "Calon" database field for a game.

    <>

    $servername = "localhost";

    $username = 'root ';

    $password = "pass";

    $dbname = 'his ';

    Create the connection

    $conn = new mysqli ($dbname, $servername, $username, $password);

    Check the connection

    If {($conn-> connect_error)

    Die ("connection failed:".) $conn-> connect_error);

    }

    $Calon = trim($_POST['Calon']);

    $sql = (' SELECT no, Calon, ID, Jurusan candidates WHERE Calon = "'.") $Calon.' » ") ;

    $result = $conn-> Query;

    ?>

    <>

    If ($result-> num_rows > 0) {}

    ECHO '.

    ";

    each line output

    While ($row = {$result-> fetch_assoc())}

    ECHO '.

    ";

    }

    ECHO '.

    NO. Candidate Identification number Program Edit Delete
    " . $row ["no"]. " " . $row ["Calon"]. " " . $row ['ID']. " " . $row ["Jurusan"]. " Edit Delete
    ";

    } else {}

    echo "0 results."

    }

    $conn-> close();

    ?>

  • How to send an email to the table format

    Hello
    I get the list of data from the database and I want to send these data through mail in html format (table). I use the api tcEmailNotificationUtil for sending the mail. But this is not not the format of table n. Please tell me how to get there

    Thanks in advance

    JavaMail requires only the loading of a couple of pots. The wiki page has an example: http://en.wikipedia.org/wiki/Javamail

    Technically, you can simply use a socket (http://download.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html) to create the email but I tend to be lazy and use packets of level high so they do the job.

    Best regards
    / Martin

  • When I answer a mail, or want to send an e-mail, a new empty email opens. It started a few weeks ago. No idea how to stop what is happening. Help, please.

    I use an iMac with El Capitan 10.11.3 in my email software, a problem started a few weeks ago. When I answer a mail, or want to send an e-mail, a new empty email opens. No idea how to stop what is happening.

    E-mail programs must close and restart. Empty mails are stored under Concepts and should be deleted.

    Then a mail can be answered, but with the 2nd mail, the same thing happens again, and an empty mailpage appears again.

    Very annoying. Help, please.

    Please remove "Report", also known as the 'Trusteer Endpoint Protection', following the instructions on this page.

    Back up all data before making any changes.

  • How can I save my html files?  I have a PC.  Thanks for any help, Ollie

    How can I save my html files? I tried to copy, paste and drag and drop.  none worked.  I have a PC.  Thanks for any help, Ollie

    Hello Ollie,

    In addition to the trick of Murray: I for my part, I've always copy-from time to time - all my DW directories (and all the associated files) on an external hard drive.

    Hans-Günter

  • APEX_MAIL send results in an HTML table

    Apex 3.2

    I've written a procedure that sends an email with the data of the apex_workspace_activity_log.
    I would try to display that data in a table in the email.
    All the world done this before?
    CREATE OR REPLACE PACKAGE BODY EFSAPX.p_monitor_page_times AS
    
    
      procedure pr_checkelapsed(p_elapsed in number,
                                p_toemail in varchar2) is
    
        v_text clob;
    
      begin
    
        wwv_flow_api.SET_SECURITY_GROUP_ID;
        for x in (select
              application_id,
              application_name,
              page_id,
              elapsed_time
              from
              apex_workspace_activity_log
              where
              application_id = 103
              and elapsed_time > p_elapsed
              and trunc(view_date) > trunc(sysdate-1)
              order by
              elapsed_time desc)
    
        loop
    
          v_text := v_text || 'Application No: ' || x.application_id ||chr(10);
          v_text := v_text || 'Application: ' || x.application_name ||chr(10);
          v_text := v_text || 'Page Id: ' || x.page_id ||chr(10);
          v_text := v_text || 'Elapsed Time: ' || x.elapsed_time ||chr(10);
          v_text := v_text || utl_tcp.crlf;
    
        end loop;
    
        apex_mail.SEND(p_to    => p_toemail,
                       p_from  => '[email protected]',
                       p_body  => v_text,
                       p_subj  => 'Elapsed Time Metric Warning');
    
        apex_mail.push_queue('localhost', 25);
    
      end pr_checkelapsed;
    
    END p_monitor_page_times;
    See you soon

    Gus

    As says below, the real HTML involved is very simple, and there's a lot of documentation available for it.

    I normally use SQL/XML for generating HTML fragments with the embedded data:

    select
        xmlserialize(
            content
            xmlelement(
                "table"
              , xmlconcat(
                    xmlelement(
                        "tr"
                      , xmlconcat(
                            xmlelement("th", 'Application No')
                          , xmlelement("th", 'Application')
                          , xmlelement("th", 'Page ID')
                          , xmlelement("th", 'Elapsed Time')))
                  , xmlagg(
                        xmlelement(
                            "tr"
                          , xmlconcat(
                                xmlelement("td", application_id)
                              , xmlelement("td", application_name)
                              , xmlelement("td", page_id)
                              , xmlelement("td", elapsed_time)))
                        order by elapsed_time desc)))
            indent size=2) html_table
    from
        apex_workspace_activity_log
    where
        application_id = :p_app_id
    and elapsed_time > :p_elapsed
    and trunc(view_date) > trunc(sysdate-1)
    

    This avoids a lot of tedious messing about with concatenation or substitution in the PL/SQL code and translates the own and valid HTML mark-up with all the tags and attributes in the right place. However as apex_mail API docs notes, the p_body_html parameter must be a complete HTML document (and you will probably need to include any other content and style as well as the table). It's a bit tedious to nest this structure in the query, so a combination method of the lower model for the structure of the base HTML document and this approach to SQL/XML query to generate the table with data structure would be a good idea.

    I guess from the wwv_flow_api of . SET_SECURITY_GROUP_ID call that you intend to execute outside a session of APEX? Another option to consider is to create a public page in this app, or as a stand-alone application in the workspace with this query as a region of simple aid report pages/templates, and all the required style embedded in the page. The mail procedure can then use httpUriType.getCLOB to retrieve this page as a complete document which can be passed as p_body_html to apex_mail.send.

    Note the requirement that each line in the content cannot exceed 1000 characters. Whatever method you use will have to be built around model/applications are used (where the dash in the code above), or you need to process the content and insert CRLF at the appropriate places before calling apex_mail.send.

  • How can I send the animation html email for my friend (yandex, email)?

    How can I send the animation html email for my friend (yandex, email)?

    You can not post. What you can do is to publish somewhere on a server and give them the address.

  • How to send photos taken by webcam dell to the email address

    Im having two problems (if you exclude being computer delayed!) I know not how to send photos and videos by email that ive taken via my dell webcam, in addition, after using the webcam, ive fidddled with assistance or something because the screen is now almost completely black when I click on the webcam icon and try the video or taking pictures, pls help

    Hey Martina 1982,
    To attach files to your email, simply click on the play icon attached once you have the message at the top (the icon is generally that of a paper clip).
    This will open a window that allows you to browse (look around) for the file that you want to send.
    Find this location of file on your computer and click it to add it to the window and select OK.
    Depending on the size of the file, it loads a few seconds and then you will see the file attached to your email.
    Finish the email as usual and send.
    Here's a quick link:
    http://www.ehow.com/how_6356960_attach-audio-video-files-email.html

    You can also do a search on 'How to attach files to send' for more information.
    Now regarding the display options or absence of Cam you, I would say communicating with the dell printer.
    It should be on their website troubleshooting steps:
    http://support.Dell.com/support/topics/global.aspx/support/KCS/document?docid=266612

    Eddie B.

Maybe you are looking for

  • Toshiba Stor.E Basics 2.5 ": how to get rid of the folder lang

    Hey there. So I have this external hard drive 500 GB Toshiba Stor.E Basics 2.5 " , bought a year in Italy.I use it on a MacBook with a few apps, so it works perfectly well. But the thing is there is this "lang" folderwith a subfolder of separate for

  • F6D33PA #AKL: my laptop is running slow when you change a new HARD drive

    My old HDD is dead, so I buy a new one and I change it. The problem is when I change to a new one and install Windows 8 64 Bit, when I finished installing it seems to be very slow and late, so I can't install any program because it is very slow. My N

  • Cannot display the log of FAXES

    I have an HP Officejet 7310 all-in-one wired to a computor of Windows Vista 32-bit.  After sending a fax, I checked the log of faxes.  It displays fine, but did not reflect my recent fax.  Later, I tried to view the log of faxes, but when I click to

  • How to change a mask?

    How to change a mask at the same time, without manipulating the individual anchors? I just want a little perfect circle. Thank you.

  • Why my sensitive site isn't recognizing the breakpoint for a layout of phone?

    I built a site using the new version of reagent of Muse with a breakpoint 530 for the smaller version. When I view the site on a phone, the entire page is piled up in the left side of the screen, leaving a huge white margin on one side. Even if I hav