PHP

★ Access Pantheon mySQL w/ phpMyAdmin

  • 1.) You need a running install of phpMyAdmin someplace.
  • 2.) From the Connection Info button in the Site Dashboard at Pantheon...
  • 2.1) get information for the phpMyAdmin config.inc.php and ...
  • 2.2) get the username and password to login via phpMyAdmin.
  • 3.) Your in! Have fun.

    enjoy this info graphic:

Drupal 7 Form in a Block or Node w/ PHP

A simple Drupal 7 Form in a Block example.

  • w/ basic form function
  • w/ validation and submission functions
  • errors return to the block area itself as well
  • note: Drupal 7 Form API ref
  • to remove error message from appearing w/in the element; remove the 2nd line w/ $temperrors and the following IF statement that uses it.

Alright Boys! Paste this PHP code into your block to get started:

How-to create a simple Drupal XML node type

You want to use Flash or other dynamic elements in your Drupal site, you want these elements to reference dynamic XML (or minimally XML you can quickly change). You want a simple solution not overkill. You can code PHP and provide any of the data from your site but need to display an XML file.

Following are quick and dirty instructions to provide XML directly or generated by PHP in the body of a node. We do this by creating a new Content Type for XML, simplifying the templates, using PHP to create XML content and then the Path module to display the .xml extension to the node.

Subscribe to PHP