Gossamer Forum
Home : Products : DBMan : Customization :

Colf Fusion conversion

Quote Reply
Colf Fusion conversion
Hello, I was the creator of a Cold Fusion based "email friends" site. ran off of an Access DB. people enter their info, etc...other users can search for a "friend" by chosing a drop down for "Country" and "Gender" and a submit button queries the DB to return ALL of the user's information,except thier login:password. How can I do this with DBman? I keep trying, but I dont know where what and how I need to change in the cfg and pl file. Someone please help. I'll send you cookies or something Smile
Quote Reply
Re: Colf Fusion conversion In reply to
I don't know what kind of file structure you have in your Cold Fusion file. I think you're going to have to start from scratch, although there might be a way to export the data you have into a format that DBMan can read.

You might try looking at my "Configurator" at http://www.jpdeni.com/dbman/config.html to help you set up your .cfg file and the subroutines you'll need in the html.pl file.


------------------
JPD





Quote Reply
Re: Colf Fusion conversion In reply to
You don't need to offer anything for me to help you. (I'm not offended that you did, though. Smile )

First, have you installed the DBMan demo? If not, do that now. Make sure it works on your system.

Then, set up your database. You can use all the same fields except the username and password. Then test it out again and see that it works the way you want it to.

Do not go on to the next step until you have fully tested each one and you know that everything is going well.

You might want to consider installing my "Secure Password Lookup" mod, which will assure that users enter a correct email address and will allow users to get a new password if they lose their current one.

Since you're new to Perl and CGI, I suggest you take a look at my tutorial, which begins at

http://www.jpdeni.com/dbman/tutorial.html . I have tried to make it as simple as I could for complete "newbies." If you have any questions along the way, don't hesitate to ask.


------------------
JPD





Quote Reply
Re: Colf Fusion conversion In reply to
I have Dbman working. Cool. now for the Db. DO I have to deliminate it with | ?
Quote Reply
Re: Colf Fusion conversion In reply to
No, you don't have to use | as a delimiter. You can use anything you want to.

If you want a tab-delimited file, you would use

$db_delim = "\t";

Note that I used double quotes for this. It's important that you do that.

I would caution against using something like

$db_delim = '","';

Sometimes when you export a text file from Access you get quotes around each of the field values. (You can turn that off, though.) The trouble is that Access also starts the first field with a ", which DBMan will not recognize.

Oh, some things I can think of that won't work for delimiters --
"\n" which is a newline
'~~' which DBMan uses
'``' which DBMan uses

Everything else is fair game, but it would probably be better not to use something that normally appears in the file. It shouldn't mess up your database, but it will make things harder to read if you ever need to look at the .db file.



------------------
JPD





Quote Reply
Re: Colf Fusion conversion In reply to
OK, I will try that out with access now. I will use a small db just for now. OK. now next step.....
Quote Reply
Re: Colf Fusion conversion In reply to
now, I have the DB file. What I would like is for someone to go to my search page, such as:
www.premweb.com/efriend/searchbod.htm
and select the country in a pull down
and select the gender in a pull down

and click SUBMIT
and then it brings the person to the results page. How do I get people to go directly to page without having to "login"?
Quote Reply
Re: Colf Fusion conversion In reply to
Thanks for the reply.
MY ColdFusion worked with ODBC and an
Access97 DB which just contained a table of users and information.
Quote Reply
Re: Colf Fusion conversion In reply to
You'd probably need to import the database into Access, then, and export it as a text file.


------------------
JPD





Quote Reply
Re: Colf Fusion conversion In reply to
Yes, I did convert it to a text file. You can see my real email friends at:
http://www.premweb.com/efriend

Please let me know if you think I can honestly do this with Dbman. If you would like to help me, I would really appreciate it. I am a graphic artist more than a programmer .
thanks
Quote Reply
Re: Colf Fusion conversion In reply to
Yes. DBMan can certainly do this. The structure would be a little different, because signing up for an account in DBMan is a two-step process, but you can have the same kind of data.

I will be glad to help you along the way, if you have any specific questions.



------------------
JPD





Quote Reply
Re: Colf Fusion conversion In reply to
thanks so much! I honestly dont even know how to approach this in a CGI sense. I see that I can have a complete website in one cgi-document. As you can see on my emailfriend's page, I have multiple documents and such.
I also have a problem setting up the DB. My orginal table contains everything...even the person's userid/password for their "edit you file" section. I've even developed an "admin" section for me to edit/erase and addfiles.
Ill make you anygraphics you want if you can help me make this happen. Please let me know. ..I will definately give you the credit you deserve.
-tony
Quote Reply
Re: Colf Fusion conversion In reply to
MY GOSH! You are an AMIGAN???
ME TOO! I still use my a1200!! I have it running Debian Linux! wow! cool!
Quote Reply
Re: Colf Fusion conversion In reply to
Do you want this on a static html page or within DBMan?


------------------
JPD





Quote Reply
Re: Colf Fusion conversion In reply to
I think that since there is alot of overhead, I think It should be static.
Quote Reply
Re: Colf Fusion conversion In reply to
On a static html page, you will not be able to allow users to sign in before they do a search. (Just wanted you to know that.)

Create your form like this:

Code:
<form action="http://url/to/db.cgi" method="GET">
<input type=hidden name="db" value="default">
<input type=hidden name="uid" value="default">
<input type=hidden name="ww" value="1">
What gender would you like to hear from?
<SELECT NAME="gender">
<OPTION value="*"> both genders</OPTION>
<OPTION value="Male"> Male</OPTION>
<OPTION value="Female"> Female</OPTION>
</SELECT><BR>
What country would you like to have a penpal in? </FONT></B><FONT COLOR="#660000">
<SELECT NAME="country">
<OPTION value="country name">country name</OPTION>
(repeat above line for each country)
</SELECT>
<CENTER>
<P><INPUT TYPE="SUBMIT" name="view_records" VALUE="Search it!'"></P>

Make sure you look at the text in bold above. You may need to change those things to match your database. In the "db" hidden field, the value must match the name of your .cfg file -- it probably will be default. Make sure that you use the full URL to the db.cgi script. Make sure that the field names -- gender and country are *exactly* the same as defined in your .cfg file. Case and spelling count! Smile



------------------
JPD







[This message has been edited by JPDeni (edited August 31, 1999).]