Click to See Complete Forum and Search --> : PHP/CGI question


jaggy
04-17-2001, 03:58 PM
I am looking for either a php script or a cgi script, or at least some information on how to do the following:

Submit information through a form, which will then used to generate an html file for each submition.

It would include various information, and a defined-size image.

Also, i would like to make all the generated html files searchable, and create a list of all the entries (alphabetical list).

I really have no clue as how to do this, any insight would be appreciated.

------------------
A conclusion is simply the place where you got tired of thinking.

drdray
04-17-2001, 04:34 PM
Well, You can find a form parser on web, or you can stop by irc.enterthegame.com #codx and i'll hook you up with one. Rest it pretty simple. Using the file and a HTML template of how page should look, make head and footer library to be included in script. Now you are ready to write the script. Start with making the form and set actuon option to point to your cgi script that will parse form and make html file

Script itself should start with parsing from, then making/opening HTML file, write header and use parsed values form form where they should go.

For example the following will make img tag with width option.

print '<img width="';
print "$formdata{'imagewidth'};";
print '" src="';
print "$formdata{'imagesrc'}";
print '">';

Now, that you have added parsed info to html file, is time to pring you footer and close html file. This would be a good time to file you newly made html file. You got 2 options here.

1. make a text file and add new file name to it every time you make new html file.
2. add file name to database.

Now that you got all that working http://www.sharkyforums.com/ubb/smile.gif . You can start on search script. Which is a whole new topic and I'm sure you are either bored by now or completly lost. http://www.sharkyforums.com/ubb/biggrin.gif

Hope that helps. You can find me at above mentioned irc channel and i'll help when i can. I'm there mostly when im at work, so will help if i got some free time.

kid A
04-18-2001, 05:07 PM
Have you checked out http://php.resourceindex.com ?

Great site! Also check out http://cgi.resourceindex.com http://www.sharkyforums.com/ubb/smile.gif

------------------
Now listening to:
Lemonheads - Car Button Cloth
Come visit me! (http://www.ingulfsen.com)

There is no need for any individual to have a computer in their home.
- Ken Olson, 1977, President, Digital Equipment Corp.

[This message has been edited by kid A (edited April 18, 2001).]

Alphathree
04-19-2001, 06:24 PM
Without any prior server side scripting knowledge you're not going to be accomplishing this anytime soon.

Also, I'd recommend ASP. I'm a big fan of it over CGI and PHP and all that other stuff lingering around. If you already know visual basic, ASP gets even easier.

Some basic knowledge of databases and SQL might also be a good idea (primary/foreign keys, relational databases, recordsets etc.)

------------------
Tom Levesque (tomlevesque@home.com)
My Website (http://members.home.com/tomlevesque)
ICQ: 27095387
Email: tomlevesque@home.com