Gossamer Forum
Home : Products : DBMan : Customization :

3 little questions

Quote Reply
3 little questions
Hello,

I have searched and looked through all the post, and went through the tutorial trying to learn how to do the following.

1) I have set up a form which jumps to a page after submit is clicked, where the user can download a file. How do I set up an automatic download when they get to the page.

2) Using a drop-list, how do I change the default display, and can you make it a combo box. Allowing the user to either pick from the list or add there own info.

3) I set up an automatic email, when the user fills in the form, it would email them a confirmation. Currently it will only email to the address I put in. like the following:
$db_email_field = 'dbreddam@uniserve.com';

How do I referance the email field in the db, I have tried a variety of ways. Currently I have:

$db_email_field = "$rec{'Email'}";

Any suggestion where to find the answers or anyone with the answers would be greatly appreciated.

David Breddam
dbreddam@uniserve.com
Quote Reply
Re: 3 little questions In reply to
I can answer one of your questions Smile

How do I referance the email field in the db, I have tried a variety of ways. Currently I have:

$db_email_field = "$rec{'Email'}";

Here it would be looking for the field number or name:

try $db_email_field = "Email";

or use the field number.

Hope this helps Smile
Quote Reply
Re: 3 little questions In reply to
Hello

I did try the first 2 answers to my 3 questions, but nothing worked. I suspect it is the user input causing the problems.

I would like to work on getting the email problem fixed, since it is more important.

I have uploaded my files to:
www.breddam.com/dbman

The form is located at:
www.advanmedia.com/cgi-bin/dbman/db.cgi

If you want to take a look and see why it does not referance the field that would be greatly apreciated.

Would it have anything to do with the "\" that has to be in front of the "@" sign when using an email address in some cases.

David Breddam
dbreddam@uniserve.com
Quote Reply
Re: 3 little questions In reply to
Hi,

I can answer your 2nd Question. I'll have to get back to you for the 1st question.

This is a little code Carol gave me a while back.

Let's say one of your fields is Category, and you have something like this in your form.

Code:
<tr><td>Category:</td><td>|; &build_select_field "Category","$rec{'Category'}"); print qq|</td></tr>

Add the part that is in Bold

Code:
<tr><td>Category:</td><td>|; &build_select_field "Category","$rec{'Category'}"); print qq|<BR>
<input type="TEXT" name="Category" size="20">
</td></tr>

You also need to make one change in your db.cgi file.

In sub parse_form, after

if ($value eq "---") { next PAIR; }

add

unless ($value) { next PAIR; }

You just have to remember that there must be a way to tell the users that they can only do one of the other. If they do both, you'll start getting into problems.

Let me know if this works out for you.
Eli
Quote Reply
Re: 3 little questions In reply to
Hi,

About your first question, I think this will work out for you.

On the page where the users go to for the download add

Code:
<META HTTP-EQUIV="Refresh" CONTENT="1;URL=$rec{'File'}">

Where it says $rec{'File'}, make sure you make that the field of the location of the file.

This should work. If you have problems with it, let me know.

Eli