I need help. I can manage the forms - I can't figure out how to get the data posted to the database. I want to do validation, show errors, and post only when I have clean data. I have a couple of Dreamweaver manuals, but they don't seem to cover this. One is old enough to use Spry.
The form is just the first step. From there, if anything is going into a database, you need a server-side solution. Something like ColdFusion, PHP, ASP, etc. An HTML form cannot post to another .htm(l) document. It can only post to something like the aforementioned, or to a .cgi, which is another server-side script, usually used for creating emails, and such.
^ _ ^
UPDATE: It's been a while since I looked into whether or not a form can post to a .htm(l) document; HTML5 may have changed the rules on this. But I know that HTML v4 and earlier could not.
Thanks. I'm using php.
What are you having problems with? It's been years since I've worked with PHP, but I might be able to provide some guidance.
^ _ ^
'UPDATE: It's been a while since I looked into whether or not a form can post to a .htm(l) document; HTML5 may have changed the rules on this. But I know that HTML v4 and earlier could not.'
No it cant. Page extentions need to be .php to process the information if your using php. You can set your form up in a .html page then post to a .php form processing script.
php youtube tutorial - grab data from a form and insert/update into database:
Go through parts 20/21 etc as well. You'll then have all you need to insert/update and delete data from a database.
If you have issues post back and someone will try and help you through.
THANKS! I watched a Dani Krossing YouTube that was fantastic! Extremely helpful. I will check out the other link as well.
Copy link to clipboard
Create, Read, Update & Delete database records (aka a CRUD application).
WebAssist makes extensions for Dreamweaver that can help you.
They also have tutorials like this one.
Thanks so much! I will check them out and appreciate the help!
Well, I feel stupid! I got out David Powers' PHP Solutions and found everything I need. He's come to my rescue so many times - don't know why I didn't start there...
But I have learned a lot from the tutorials all of you recommended and thank you for the responses!
I can't find any indepth information about 'Php Solutions' BUT as long as it uses Mysqli (improved) OR PDO to connect to your database then its good. I think some of the older editions, published years ago, used mysql which is now out-dated and should not be used. It may have since been updated to incorporate the mysqli(improved) OR PDO workflow. None of the descriptions about it, which I found on Google, give insight into what workflow it uses.
Unfortunately David has not been active in these forums for several years. I don't know if he retired or just moved on. There are now so many youtube videos and online courses like Udemy to compete with.
The newer book by David Powers is PHP Object-Oriented Solutions. He does cover SQLi & PDO. However, my host supports PDO but NOT yet SQLi. The Powers books are well-written, easy to understand. Lots of information in helpful formats.
I'm experiencing an odd problem in Dreamweaver 20.2 & hope someone out there can help. The line feed <br /> seems to have become <br>, but when I wanted to get ONE line of space between my horizontal menu bar and the page heading, I had to use 10 (TEN!!!!!) of those symbols. Is anyone else experiencing this? It's extremely annoying!
PDO and Sqli are both fine workflows to use, youre obviously using a more recent publication. PDO is more flexible in terms of databases it works with whereas Sqli only works with mysql databases. So if youre familar with PDO then Id recommend using that as you're covered in most situations.
<br /> was used in doctypes prior to html5 doctypes, since then you no longer need to close the <br> tag so in modern web deisgn its become <br>. Is your horizontal menu bar a fixed container? If it is then its taken out of the normal html workflow so you may have to use many <br> tags to push other elements down the page (a bad method). Use margin-top or padding-top on the container that the page heading is in.
Thanks! That did it! I put a top margin on the container & got rid of all the <br>s. Is there any way to find other changes in coding since html5? I hate spending time fighting something like that!
Although not new as HTML5 has been the accepted web standard since 2014.
New Elements in HTML5
Deprecated in HTML5
MDN- HTML Developer's Guide
Thanks! I appreciate the help and advice.