Skip to main content
ElizabethGailLittle
Inspiring
August 20, 2020
Answered

I need tutorial(s) for building interactive forms to update database

  • August 20, 2020
  • 5 replies
  • 1044 views

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.

    This topic has been closed for replies.
    Correct answer ElizabethGailLittle

    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!

     

    Thanks & 

    👏🤦🏼‍♀️🙋🏼‍♀️

    5 replies

    Legend
    August 23, 2020

    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.

     

    ElizabethGailLittle
    Inspiring
    August 23, 2020

    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!

    Legend
    August 23, 2020

    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.

    WolfShade
    Legend
    August 20, 2020

    Hey, guys.  You forgot about validation and sanitization.

     

    V/r,

     

    ^ _ ^

    ElizabethGailLittle
    ElizabethGailLittleAuthorCorrect answer
    Inspiring
    August 23, 2020

    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!

     

    Thanks & 

    👏🤦🏼‍♀️🙋🏼‍♀️

    Nancy OShea
    Community Expert
    Community Expert
    August 20, 2020

    Create, Read, Update & Delete database records (aka a CRUD application).

    https://www.tutorialrepublic.com/php-tutorial/php-mysql-crud-application.php

     

    WebAssist makes extensions for Dreamweaver that can help you.

    https://www.webassist.com/

     

    They also have tutorials like this one.

    http://www.webassist.com/tutorials/Insert-update-delete-records-with-MySQLi-Server-Behaviors

     

    Nancy O'Shea— Product User & Community Expert
    ElizabethGailLittle
    Inspiring
    August 20, 2020

    Thanks so much!  I will check them out and appreciate the help!

    Legend
    August 20, 2020

    php youtube tutorial - grab data from a form and insert/update into database:

    https://www.youtube.com/watch?v=9t7AH7lOlL0

     

    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.

    ElizabethGailLittle
    Inspiring
    August 20, 2020

    THANKS!  I watched a Dani Krossing YouTube that was fantastic!  Extremely helpful.  I will check out the other link as well.

    WolfShade
    Legend
    August 20, 2020

    Hello, Elizabeth,

     

    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.

     

    HTH,

     

    ^ _ ^

     

    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.

    ElizabethGailLittle
    Inspiring
    August 20, 2020
    I'm using php.