I am just starting to play with PHP (and this is my first post). I need to send out an invitation via email to some of our clients. This email will contain a hyperlink along with a unique reference ID for each client, something like this:

www.oursite.com/invitation.php?ID=ABC123

I need to get this reference to a table in an Access database that will sit on our web-server. This is only a one off at this stage with very low volumes, so I don’t really want to go down the MYSQL route (at this stage).

I could really do with some help to point me in the right direction – anything at all would be greatly appreciated. Thank you.

Recommended Answers

All 3 Replies

If your wanting to connect to a msaccess database you are probably better off using ASP, however this can be done in PHP using ODBC.

There is a brief tutorial here

It is actually alot easier to use mysql, even just for one-offs, but it is possible to use MS Access and is also easy once you get the hang of it.

Hope this is helpful :)

Thanks for your help on this - much appreciated. I'll take a look at it tomorrow.

All the best.

In the end I took a slightly different route. I simply setup the webpage to ping an email to a specified address and then take the user to the page - based on the hyperlink sent. I then linked directly into the Outlook folder (where the emails were sent to) and there you go.

Not quite as slick as the PHP/MySQL route - but dead easy to setup. I used the following hyperlink (sent on the original email) to generate the email:

http://www.ourdomain.com/invite.php?ID=ABC123

And the PHP code (saved as invite.php)looked something like this (ignore the [] brackets):

[
<?php
$subject = $_GET . '-' . date("Ymd H:i:s");
$headers = 'From: webmaster@ourdomain.com' . "\r\n" . 'Reply-To: webmaster@ourdomain.com' . "\r\n" .
mail('Invites@ourdomain.com', $subject, '', $headers);
header("location: index.html");
?>
]

Hope this helps someone - and thanks metalix for your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.