Retrieving data from database and mail them

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jari Dolberg

    #1

    Retrieving data from database and mail them

    Hi,

    I am looking for a solutions for the following problem,
    I need to access at database from within a website, from where I can
    retrive a specific document in the database and mailing it to someone
    else. Of course I cut crab the document from the database and save it on
    my harddrive, and then send it. But this process don't fit into our
    busy days.

    I thought that javascript might be an idea?

    Can anyone help?
  • Joakim Braun

    #2
    Re: Retrieving data from database and mail them

    "Jari Dolberg" <jaridolberg@ho tmail.com> skrev i meddelandet
    news:413f4a5d$0 $215$edfadb0f@d read11.news.tel e.dk...[color=blue]
    > Hi,
    >
    > I am looking for a solutions for the following problem,
    > I need to access at database from within a website, from where I can
    > retrive a specific document in the database and mailing it to someone
    > else. Of course I cut crab the document from the database and save it on
    > my harddrive, and then send it. But this process don't fit into our
    > busy days.
    >
    > I thought that javascript might be an idea?
    >
    > Can anyone help?[/color]

    There is no Javascript-intrinsic, cross-browser database connectivity
    mechanism (though very possibly some technology that is IE-only). However,
    client-side you might find the "new Image()" technique useful, like so:

    var newImage = new Image();
    newImage.src =
    "mailRecordFrom Database.php?re cordid=12345&em ail=someone@som ewhere.com.

    This would have the effect of triggering a server-side page (PHP in this
    case), which can harvest the query string, contact the database, retrieve
    the data, format it and email it. Depending on the complexity of the
    database interaction, I'd say this might take maybe 20 lines of server-side
    PHP code.

    Joakim Braun


    Comment

    • Philip Ronan

      #3
      Re: Retrieving data from database and mail them

      On 8/9/04 7:18 pm, Joakim Braun wrote:
      [color=blue]
      > However,
      > client-side you might find the "new Image()" technique useful, like so:
      >
      > var newImage = new Image();
      > newImage.src =
      > "mailRecordFrom Database.php?re cordid=12345&em ail=someone@som ewhere.com.[/color]

      Good grief, don't put anything like that on your web pages. Not unless you
      want a bunch of bored teenagers emailing your database all over the place.

      --
      Philip Ronan
      phil.ronanzzz@v irgin.net
      (Please remove the "z"s if replying by email)


      Comment

      • Joakim Braun

        #4
        Re: Retrieving data from database and mail them

        "Philip Ronan" <phil.ronanzzz@ virgin.net> skrev i meddelandet
        news:BD6510A7.2 0D45%phil.ronan zzz@virgin.net. ..[color=blue]
        > On 8/9/04 7:18 pm, Joakim Braun wrote:
        >[color=green]
        > > However,
        > > client-side you might find the "new Image()" technique useful, like so:
        > >
        > > var newImage = new Image();
        > > newImage.src =
        > > "mailRecordFrom Database.php?re cordid=12345&em ail=someone@som ewhere.com.[/color]
        >
        > Good grief, don't put anything like that on your web pages. Not unless you
        > want a bunch of bored teenagers emailing your database all over the place.
        >
        > --
        > Philip Ronan
        > phil.ronanzzz@v irgin.net
        > (Please remove the "z"s if replying by email)[/color]

        Well, demo code doesn't preclude some additional application of brains for
        real-world deployment.

        Joakim Braun


        Comment

        Working...