[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Email Form



Hi Patrick,

> I would be happy to provide you with either a simple or long form.

I am after something similar, but I also need to be able to populate two of
the inputs
from details within the page it is being called from, i.e. if it has inputs
of item, size,
I would like to be able to create a link a page that calls the page and
populates these
two elements.. Any ideas much appreciated.....

Mac

This is ever so easy to do, really basic PHP stuff!

Say we have two variables to be taken between a page where a graphic is
clicked one is called "refcode" and the other "short". We want to take the
correct ones from an array that we have taken from a daatbase and pass them
to the next page. Where $row is the row from the SQL statement.

In the page where you want the source to be;
<a href=\"feedback.php?refcode=" . htmlentities(urlencode($row["ref"])) .
"&short=" . htmlentities(urlencode($row["short_desc"])) . " \"><img
src=\"graphics/clicktobuy.gif\" width=\"110\" height=\"38\"
border=\"0\"></a>

in the page where you are catching the values the field HTML can be;

 <input type="text" name="refcode" value="<?php echo $refcode; ?>"
size="20">

and the same for "short"

If it is just fields that you filled in that want passing accross it is even
easier!


Phil



** http://www.diygear.com THE Online DIY Toolstore For DIY & Business
** Infolink Electronic Systems Ltd. http://www.infolinkelectronics.co.uk
** Professional Web Design & Cobalt Hosting Solutions
** Sun Cobalt iForce Reseller - Canon Silver Reseller
** Contact: Sales@xxxxxxxxxxxxxxxxxxxxxxxxx
** Tel / Fax 0121 458 4894 (office) 0121 441 3558 (home)