PHP
  Home arrow PHP arrow Page 8 - Building PHP Applications With Macromedia Dreamweaver MX
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PHP

Building PHP Applications With Macromedia Dreamweaver MX
By: Harish Kamath, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 32
    2002-12-18


    Table of Contents:
  • Building PHP Applications With Macromedia Dreamweaver MX
  • Hooking Up
  • Test Drive
  • Breaking Ground
  • Naming Names
  • Bringing In The Database
  • Appearances Are Everything
  • In And Out
  • I, Robot
  • Weaving The Web

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Building PHP Applications With Macromedia Dreamweaver MX - In And Out
    ( Page 8 of 10 )

    OK, so that took care of displaying the records - now how about inserting and deleting records?

    First, use the Dreamweaver editor to create an HTML form that maps to the columns of the "user" table.



    Once the form has been prepared, apply the "Insert Record" server behavior, and you'll see a dialog box like this:



    This dialog box makes it very easy to map form fields to the table in which data is to be inserted. Once you select the appropriate database connection and table, the fields of the table are displayed; these fields can be mapped to specific fields in the form via the "Value" drop-down list. Dreamweaver takes care of writing the SQL query needed to insert the data entered by the user in each field into the appropriate column in the table.

    After you've finished mapping form fields to table columns, remember to specify the URL to which the browser should be redirected once the data has been successfully inserted into the database.

    Once you're done, save the PHP script and access it via your browser. You should see the HTML form you created:



    Enter some values and submit the form. The code generated by Dreamweaver MX will insert the values into the "user" table and then redirect the browser to the URL selected...all without the developer writing a single line of code!

    It's just as simple to delete records - create a new PHP script and use the "Delete Record" server behavior. You'll see the following dialog box, which asks you to specify the variables that the script should use when identifying which record to delete.



    As you can see, in the example above, I've told Dreamweaver to look for the "id" variable in the URL string, and to delete the record corresponding to that ID in the "user" table. Save the script (I'll assume it's called "delete.php"), and access it via your browser (remember to add the "id" variable-value pair to the URL string, like thus: http://your.server/delete.php?id=15), and the record corresponding to the ID provided should get deleted from the database.

    Obviously, it's pretty easy to now link the three scripts above with each other, so as to build a primitive, yet fully-functional, user administration module (in case you're wondering, yes, Dreamweaver also comes with an "Update Record" behavior - I'll leave that to you to experiment with.)

     
     
    >>> More PHP Articles          >>> More By Harish Kamath, (c) Melonfire
     

       

    PHP ARTICLES

    - Adding Ordering and Grouping Clauses to the ...
    - Implementing Factory Methods in PHP 5
    - Merging a File Split for FTP Upload using PHP
    - Getting Data from Yahoo Site Explorer Inboun...
    - Method Chaining: Adding More Selecting Metho...
    - How to Split a File During an FTP Upload Usi...
    - Expanding a Custom CodeIgniter Library with ...
    - Using the Yahoo Site Explorer Inbound Links ...
    - Building a CodeIgniter Custom Library with M...
    - Building an E-mini Trading System Using PHP ...
    - Completing the MySQL Class with Method Chain...
    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek