"Jari Dolberg" <ja*********@hotmail.com> skrev i meddelandet
news:41*********************@dread11.news.tele.dk. ..
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?
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 =
"ma*********************************************** ******@somewhere.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