Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to learn about building Forms? Programming Sites or...?

Status
Not open for further replies.

barb123

Technical User
Feb 18, 2009
16
US
Hello All:

I am learning in fits and starts about web programming. I have built my site in Dreamweaver and have hit a wall as I want to include a Survey (that returns results to the same page) and a Comments Form (that lists the comments to the same page). I have looked at w3 schools but cannot find the tutorials.

A) What specifically do I need to learn to do this, and B) can you tell me where I can go to learn it? I programmed way back in the day (Pascal, etc), so I am up for learning this. Also, C) is this stuff complicated? Should I just hire someone - would it take them 15 minutes or???

Merci!
 
If you want to keep it simple, and can do without a database running it all, you can choose a server side language such as ASP, PHP, Cold fusion etc... and write this up quickly using text files for storage and quite easily since you have a Pascal background.

Likely what you'll want to be looking at for the survey is just to code an HTML form to grab the answers and add them to a file that keeps the results. This should be easy if you look for tutorials on writing and reading to text files, and extrapolate from there what you want to store for the survey results, and read back when necessary.

For the comments, you could use a pre-built commenting script, of which there are many out there. Again you'll need to decide what server side language you want to use, and look based on that. Also if you don't want a DB you can store the comments in a file, though they may grow very large if you are expecting lots of comments.

Google has a few hits with "PHP comments scripts"

So to answer your questions:

A: Server side Programming Language is a must, you'll have to choose based on what your web host supports, and what you may feel more comfortable with. PHP I think is a little closer to what you are used to with Pascal I think.

B:Many Tutorials out there, again depending on what yo choose will be the locations for it.

C: It can be if you want many features and/or incorporate a Database for the storage of the comments, if you stick to basics it shouldn't be to complicated.

A hired person may be able to deliver a working script in a day for one of the requirements. But they may not really want to if they charge by the time it takes them to do it.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thank you phil aka Vacunita. I took your advice and I spent time this past weekend going through lots of books and learning. I have two separate questions.
1) how come I see what "seem" like radically different approached to the PHP scripting. The GentleScript site is great but -- for instance -- the way they say to do comments is so much more involved than another script I found on HotScripts.com. Are there many ways to do that same things, and why is one much more complicated?

2) Here is a script I found on HotScripts-- below. I am still missing a "click" in my head of exactly the flow of how this works. From you, I understand PHP script is the communication between my HTML form and my database. Now, Here is the script --if you have time there are THREE questions I have on it- I really am learning this so I thank you for taking time to help me get it! My question for you are in ???**CAPS!!
Installation
------------
1. Enter database information into the top of inc_rate.php and submitcomment.php. **I UNDERSTAND THIS, I HAVE SET THIS UP THANKS TO YOU!
2. Upload all of the files onto your server. ??**** I KEEP GETTING CONFUSED WITH THIS, ALSO FROM THE GENTLESCRIPT SITE -- DO THEY MEAN UPLOAD TO MY MAIN SITE FOLDER??? BECAUSE THE SITE I AM BUILDING IS "NOT" IN MY MAIN SITE!!!! SO SHOULD I BE UPLOADING THEM TO THE DIRECTORY I AM BUILDING A SITE FOR OR MY MAIN SITE?????
3. Use SQL query in table.sql to create your table in your MySQL database. ???**WHAT DOES THIS MEAN? I HIT A WALL HERE.
Usage
------
4. You can call the script on any page by using the following code: ???*** SO I JUST INSERT THIS INTO MY TABLE? I THOUGHT IN THE PROPERTIES WINDOW I NEED TO ASSIGN A PAGE ON THE "SUBMIT" BUTTON where it says ACTION and METHOD (POST)

<?
require('inc_rate.php');
getComments("1");
submitComments("1","$PHP_SELF");

THANKS MUCH!
 
1) how come I see what "seem" like radically different approached to the PHP scripting. The GentleScript site is great but -- for instance -- the way they say to do comments is so much more involved than another script I found on HotScripts.com. Are there many ways to do that same things, and why is one much more complicated?
Everybody has different coding styles. Some may be more convoluted than others. Some may be doing more things behind the scenes than others. As they say there are many ways to skin a cat.

2. Upload all of the files onto your server. ??**** I KEEP GETTING CONFUSED WITH THIS, ALSO FROM THE GENTLESCRIPT SITE -- DO THEY MEAN UPLOAD TO MY MAIN SITE FOLDER??? BECAUSE THE SITE I AM BUILDING IS "NOT" IN MY MAIN SITE!!!! SO SHOULD I BE UPLOADING THEM TO THE DIRECTORY I AM BUILDING A SITE FOR OR MY MAIN SITE?????
It means upload them to somewhere your site will have access to them. Normally if your site is in a subdirectory and you don't intend to share the code with any other site in the server, it would go in the subdirectory for the site.

Otherwise you can place it in the root, and just point everything to the root where the files are.

3. Use SQL query in table.sql to create your table in your MySQL database. ???**WHAT DOES THIS MEAN? I HIT A WALL HERE.
Usage

table.sql likely contains the commands to build the table you need for the commenting system with column and data type definitions.

You can feed this directly to your DB to have it automatically create the required table.

Depending on how you access your database will be how you feed the file to it.

4. You can call the script on any page by using the following code: ???*** SO I JUST INSERT THIS INTO MY TABLE? I THOUGHT IN THE PROPERTIES WINDOW I NEED TO ASSIGN A PAGE ON THE "SUBMIT" BUTTON where it says ACTION and METHOD (POST)

Usually yes, however the PHP scripts may already do all that for you. I can't be sure without knowing exactly which script you are using, but it sounds like the PHP scripts build the form and interactions for you. Just inserting the code where you want the comment form to appear might be all it takes.


----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
This is all assuming that your host can run php and that you have or can add a database to your site (the MySQL part)...

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top