I have a form that allows someone to tell a friend about a product. The select options include each of the products which are coded by an ID number.

To create a link in the outgoing mail by PHP page

I have a var coming from a Select Option $productid

It is written as
<OPTION VALUE="23532">

What I need to do is have this provide a complete link and name of the product

I would like to parse the databse of the store so that if the ID number is provided, on the resulting php page that sends the mail and displays the results on the screen, I want to read from the data base to complete the link that goes on to the screen and into the mail

Thus pulling
$product_name
$product_description
$product_thumbnail

and composing it into a preformatted HTML email message.

<P ALIGN="CENTER"><IMG SRC="$imagelink" width="100" height="120"><BR>
<A HREF="http://www.foobar.com/products.php?productid="$productid"> $product name</A> $product_description</P>

Any ideas?

    THat's a great idea; however, where are you having problems? I am not writing this to discourage you, but just point out that we are a helping board, not a service.

    You'll need to familiarize yourself with PHP and mySQL integration and querying a database for information. There are some good basic tutorials online if you just google/yahoo!/iwon/webcrawler/msn it.

    Obviously you'll also need to familiarize yourself with PHPs Mail() functions as well as look at PEAR and other open-source classes and pre-compiled scripts to help you out.

    If you need clarification with anything, don't hesitate to ask; however, we aren't going to write the entire script(s) for you.

    ~Brett

      Write a Reply...