top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How I can get started working with PHP/MySQL inside of the WordPress app?

+2 votes
585 views

I have moderate level PHP programming skills. I am also interested in merging those skills inside of the WordPress app. With their advanced responsive design themes and many other functions it seems like a good idea. I have tried loading some PHP plug-ins in WP – but I don't seem to get them to do more than basics.

Can anybody help me on how I can get started working with PHP/MySQL inside of the WordPress app?

posted May 22, 2014 by Kumar Mitrasen

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Are you locked on WordPress? I'd advise Drupal over WordPress. The architecture is just more solid. I had worked with both and I always feel dirty with the WordPress approach to hooks and themes...

2 Answers

+1 vote

I suggest that you immerse yourself in the Wordpress docs and get to understand how it works under the hood. Everything, basically, is a "post".

answer May 22, 2014 by Abhay
+1 vote

This is all answered in the online docs available on the Wordpress site. I researched it myself at one time a while back. In fact, you can work with the code base of wp to display pages of your own design, without ever using the actual wp engine to display the pages. Search for "The Loop" on their site, a key concept in their core code.

BTW, I agree with the other respondent about Drupal. It's a marvel of smart design. But I'd have to say that Wordpress's administrative functionality more complete and easier to use than Wordpress's. Wordpress also had more widespread support and adoption than Drupal.

answer May 23, 2014 by Sonu Jindal
Similar Questions
0 votes

I'm looking for a very good, pre made, working PDO and/or mysqli database class (in a wrapper) - to get started with, that has all the basic needs like UPDATE - INSERT - DELETE - QUERY etc. That would be very helpful. I'm also trying to learn OOP, and creating my own class to start out is over my head, so one that is recommended here would be a good start.

There are many examples on the net - The problem is that commenters often have issues with the code, and as a beginner in this area - these issues are sometimes over my head and it would be best for me if someone could recommend a good working standard model to start.

Q: DOES ANYONE HAVE ANY OPINIONS ON THE ONES BELOW?
https://github.com/ajillion/PHP-MySQLi-Database-Class
http://www.phpclasses.org/package/2359-PHP-MySQL-database-wrapper-using-MySQLi-extension.html
http://snipplr.com/view/22992/

Jeffrey Way...
http://forrst.com/posts/Mysqli_Database_Class-hxb
http://www.dotred.be/blog/database-classes-for-mysql-mysqli-and-mssql/

PDO...
Jeffrey Way - some issues here in comments
http://net.tutsplus.com/tutorials/php/php-database-access-are-you-doing-it-correctly/
http://www.phpclasses.org/package/7533-PHP-Access-SQL-databases-using-PDO.html
http://www.doctrine-project.org/projects/dbal.html
http://pear.php.net/package/MDB2

0 votes

I am trying to export certain data from my PHP form to CSV. I can echo out to screen during testing and I can also export to CSV the static test data (stored in the $contents array) you see below. But I am stuck trying to export the certain fields that I only need to export.
This is my code

// How do I get this info into the CSV?
/*foreach ( $entries as $entry ) :  
    echo $entry['2'];
    echo $entry['3'];
    echo $entry['6'];
endforeach;*/

$csv_headers = [
    'Organisation Name',
    'Registered Charity Number',
    'Address',
    'Phone',
];

$contents = [
  [2014, 6, '1st half', 'roland@fsjinvestor.com', 0, 0],
  [2014, 6, '1st half', 'steve@neocodesoftware.com', 0, 0],
  [2014, 6, '1st half', 'susanne@casamanager.com', 0, 0],
  [2014, 6, '1st half', 'tim', 0, 0]
];

fputcsv($output_handle, $csv_headers);

foreach ( $contents as $content) :
    fputcsv($output_handle, $content);
endforeach;
...