• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 146
  • Last Modified:

Form Submission

Does the URL come from the networking file, or the personal file on Dreamweaver?  Does it matter?  Thanks in advance!
0
Misty Corning
Asked:
Misty Corning
  • 2
1 Solution
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Normally, this is an easy question. However, in Dreamweaver, you probably want to use the networking file and that will also depend on how you have your site set up.

Assume you have mysite.com sitting locally on c:\my documents\sites\mysite.  You have two files.  form.php and process.php both top level (same folder in c:\my documents\sites\mysite) meaning mysite.com\form.php and mysite.com\process.php.

Your form will look like
<form method="post" action="process.php">
  <input name="firstname" type="text">
  <button type="submit">Submit</button>
</form>

Open in new window

This is what you want to end up with.  What can make it confusing with Dreameaver is your network (server) may be set up using c:\inetpub\sites\mysite\httpdocs  Where everything starting in mysite is actually public but you have a folder called httpdocs that you are putting your site files in and possibly redirecting to. If you have your dreamweaver site set up to not include httpdocs, and you rely on the dreamweaver wizards, you may get into trouble.

Hear me now, believe me later, take a time out and learn how to code and not have to rely on the wizards because they can cause problems later.  Check out https://www.codecademy.com/en/tracks/php,  https://www.w3schools.com/php/, http://www.learn-php.org/, https://www.codeschool.com/learn/php   

Start with operators, variables, loops and arrays. Then move on to processing form data then connecting with a db. It will take you a several days or more now, but will save more than 10 times that down the road if you can use the code view in dreamweaver. Otherwise, we are here to help.
0
 
Misty CorningAuthor Commented:
Thanks for the info.  I did start with codecademy, but I only got so far.  I will continue to practice with it.  I have most of my design done (radio and checkboxes), but could you help me with the php portion of this?  I need it to communicate with the server.

What I'm try to do is have the user click on the appropriate buttons in each field, then click submit or clear form.  Thanks!
1
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
I'm sorry, I started to write previously and thought I finished.

For this question, "Does the URL come from the networking file, or the personal file on Dreamweaver?  " the best thing to do is either use the full url or the absolute path.

If your domain is called mysite.com and you are not using any subfolders, and the file you want to submit to is process.php, then all you need to do is use "/process.pnp" for the url or use "https://mysite.com/process.php.

If you are using a subfolder like mysitecom/subfolder/process.php then either "/subfolder/process.php" or "https://mysite.com/subfolder/process.php".  If your site does not have a certificate, then don't use https and just use http.  If it were me, I would stick to using the absolute path. That way if you do not have a certificate now and add one later, you do not have to update your code.

When you try and use the url generated by the dreamweaver wizard, you are relying on how you have the site site up locally and many times this is a cause of confusing and creates problems. Therefore, just use the absolute path as I showed you.

> help me with the php portion of this?  I need it to communicate with the server.
>What I'm try to do is have the user click on the appropriate buttons in each field, then click submit or clear form.

The best way to get help here is to keep each question thread to one item at a time. Otherwise, it can get confusing.   If I answered your initial question, close this one out.  Then ask  additional questions about the php portion as that could get to be longer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now