<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Migli on Medium]]></title>
        <description><![CDATA[Stories by Migli on Medium]]></description>
        <link>https://medium.com/@miglisoft?source=rss-2266609133e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*oJ-M6HpPPXtWcD83.jpg</url>
            <title>Stories by Migli on Medium</title>
            <link>https://medium.com/@miglisoft?source=rss-2266609133e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 07:05:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@miglisoft/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Visual Diff Merge — Compare and Merge Files Instantly]]></title>
            <link>https://medium.com/@miglisoft/visual-diff-merge-a7e13a222107?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7e13a222107</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[merge-text-online]]></category>
            <category><![CDATA[compare-side-by-side]]></category>
            <category><![CDATA[online-diff-tool]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Fri, 25 Apr 2025 09:47:35 GMT</pubDate>
            <atom:updated>2025-06-06T07:41:58.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Best Free Online Tool to Compare and Merge Files Instantly</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uCvY7z3jzlHVy8D_JIcrw.png" /></figure><h4>Spot differences, merge changes, and download the result — all in your browser with no installs.</h4><p>Compare and merge any two versions of files, code snippets, or web pages — right in your browser with <strong>no install</strong>, <strong>no signup</strong>, and <strong>four flexible modes</strong>.</p><p>Visual Diff Merge offers side-by-side diffs, click-to-merge, syntax highlighting for 180+ languages, and instant download under GPL-3.0.</p><h3>Why You’ll Love This Tool</h3><ul><li>🖥 <strong>Instant Setup</strong><br>Open your browser, navigate to Visual Diff Merge, and start comparing — no installations or plugins needed.</li><li>🔍 <strong>See Changes Clearly</strong><br>Side-by-side views with color-coded highlights make insertions, deletions, and modifications pop.</li><li>✅ <strong>Click-to-Merge</strong><br>Accept or reject individual changes with one click, then download a unified file.</li><li>🌐 <strong>Use Anywhere</strong><br>Four modes (File Browser, File Upload, Text Compare, URL Compare) cover every scenario — online or self-hosted under GPL-3.0.</li></ul><h3>Four Powerful Modes for Everyday Scenarios</h3><ol><li><strong>File Browser Mode<br></strong>Browse server-hosted files and pick two to compare.</li></ol><figure><img alt="Visual Diff Merge’s File Browser mode" src="https://cdn-images-1.medium.com/max/898/1*uYasM_5mtYlZbCAfOeQySQ.png" /></figure><p><strong>2. File Upload Mode<br></strong>Drag &amp; drop local files for quick, one-off diffs.</p><figure><img alt="Visual Diff Merge’s File Upload mode" src="https://cdn-images-1.medium.com/max/898/1*zoNdHWGkkreX2w7viENcnA.png" /></figure><p><strong>3. Text Compare Mode<br></strong>Paste text or code snippets and merge inline.</p><figure><img alt="Visual Diff Merge’s Text Comparison mode" src="https://cdn-images-1.medium.com/max/898/1*wLwdsFBXfitEzhmj5vhtOQ.png" /></figure><p><strong>4. URL Compare Mode<br></strong>Enter two URLs to fetch and diff live web pages.</p><figure><img alt="Visual Diff Merge’s URL Comparison mode" src="https://cdn-images-1.medium.com/max/898/1*EjQUsWRgGrruQ54DI2kVIA.png" /></figure><h3>Who Is It For?</h3><ul><li><strong>Developers</strong><br>Compare branches, patches, or pull requests without installing git locally.</li><li><strong>Writers &amp; Editors</strong><br>Merge feedback from multiple collaborators in a single document.</li><li><strong>Project Managers</strong><br>Review spec revisions, contracts, or policy updates at a glance.</li><li><strong>Anyone</strong><br>in need of a fast, secure way to compare and merge content.</li></ul><h3>Key Features</h3><ul><li>🔓 <strong>Online diff &amp; merge</strong> — no file uploads to third-party servers required</li><li>🎨 <strong>180+ language support</strong> with syntax highlighting (via highlight.js)</li><li>⚙️ <strong>Click-to-merge interface</strong> for granular control over changes</li><li>🔐 <strong>Open-source (GPL-3.0)</strong> — self-host to integrate into CI/CD pipelines</li><li>📥 <strong>Instant download</strong> of merged results</li></ul><h3>How to Get Started</h3><ol><li><strong>Use It Online (Zero Setup)</strong><br>Visit <a href="https://visual-diff-merge.miglisoft.com/">visual-diff-merge.miglisoft.com</a></li><li><strong>Self-Host (Full Control)</strong><br>Clone or fork from: <a href="https://github.com/migliori/visual-diff-merge">github.com/migliori/visual-diff-merge</a></li></ol><p><strong>Try Visual Diff Merge today</strong> and never waste time re-reading unchanged content.<br>⭐️ If you find it valuable, please star the GitHub repo and share your use case in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7e13a222107" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Database Interactions with PowerLite PDO]]></title>
            <link>https://medium.com/@miglisoft/php-pdo-database-class-40d76f5057fa?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/40d76f5057fa</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[pdo]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[crud]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Wed, 15 Nov 2023 10:49:18 GMT</pubDate>
            <atom:updated>2024-04-15T17:32:43.277Z</atom:updated>
            <content:encoded><![CDATA[<p>A lightweight, object-oriented library that simplifies database interaction in PHP applications. <a href="https://github.com/migliori/php-pdo-db-class">Learn more and download on Github</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*d72dSzIO9HR8Yl5ymnXsSw.png" /></figure><h3>Overview</h3><p><a href="https://www.powerlitepdo.com/">PowerLite PDO</a> is a powerful and lightweight PHP library designed to simplify the process of interacting with databases using PHP Data Objects (PDO). The source code is available on Github here: <a href="https://github.com/migliori/power-lite-pdo">https://github.com/migliori/power-lite-pdo</a>.</p><p>This library is built on top of PDO and provides a set of tools and utilities to make working with databases easier, more secure, and more efficient. It offers a simple and intuitive API for executing queries, building complex SQL statements, and paginating results.</p><p>PowerLite PDO is designed to be flexible and extensible, allowing you to customize and extend its functionality to suit your needs.</p><h3>Key Features</h3><p><strong>PowerLite PDO</strong> offers a wide range of features to help you work with databases more effectively. Some of the key features include:</p><ul><li><strong>Simplified Database Interactions</strong>: PowerLite PDO provides a simple and intuitive API for executing queries and interacting with databases.</li><li><strong>Secure Query Building</strong>: The QueryBuilder class helps you build complex SQL queries in a secure and programmatic way.</li><li><strong>Pagination Support</strong>: The Pagination class makes it easy to paginate query results and handle large datasets.</li><li><strong>Database Driver Management</strong>: The DriverManager class manages database drivers and provides a consistent way to connect to different databases.</li><li><strong>Dependency Injection Container</strong>: PowerLite PDO uses a Dependency Injection (DI) container to manage dependencies between different parts of the system.</li><li><strong>Customizable and Extensible</strong>: PowerLite PDO is designed to be flexible and extensible, allowing you to customize and extend its functionality to suit your needs.</li></ul><h3>Installation</h3><p>You can install PowerLite PDO via Composer by running the following command:</p><pre>composer require migliori/power-lite-pdo</pre><p>Alternatively, you can download the library from the <a href="https://github.com/migliori/power-lite-pdo">GitHub repository</a> and include it in your project manually.</p><h3>Architecture Overview</h3><p>PowerLite PDO is built around a few core components that work together to provide a seamless experience for interacting with databases. The main components are:</p><ul><li><strong>Db</strong>: The core class that manages the database connection and provides an interface for executing queries.</li><li><strong>QueryBuilder</strong>: A powerful tool for building SQL queries in a programmatic and secure way. It abstracts the underlying SQL syntax and provides a fluent, chainable interface for constructing queries.</li><li><strong>Pagination</strong>: A class for handling pagination of query results.</li></ul><p>PowerLite PDO also includes a DriverManager class that manages the database drivers. The DriverManager is used by the Db and QueryBuilder classes to establish a connection to the database using the specified driver.</p><h3>Getting Started</h3><h4>Enter your connection settings</h4><p>To connect to your database and start using PowerLite PDO, you need to enter your connection parameters in the dedicated file (src/connection.php)</p><h4>Connect Using the DI Container</h4><p>PowerLite PDO uses Dependency Injection (DI) to manage dependencies between different parts of the system. The DI container is configured in a bootstrap file, and the separate connection file is used to manage database connections.</p><p>Load the DI container and the class you want to use in your project:</p><pre>use PowerLite\Db;<br><br>require_once &#39;src/bootstrap.php&#39;;<br>$db = $container-&gt;get(Db::class);</pre><p>This example illustrates how to load the Db class using the DI container. You can also load other classes, such as QueryBuilder or Pagination, in a similar way.</p><h4>Start using PowerLite PDO to interact with your database:</h4><h4>$results = $db-&gt;query(&#39;SELECT * FROM users&#39;); foreach ($results as $row) { echo $row[&#39;name&#39;] . &#39;&lt;br&gt;&#39;; }</h4><pre>$results = $db-&gt;query(&#39;SELECT * FROM users&#39;);<br>foreach ($results as $row) {<br>    echo $row[&#39;name&#39;] . &#39;&lt;br&gt;&#39;;<br>}</pre><p>The example above demonstrates how to execute a simple query using the Db class and iterate over the results.</p><p>Now, let’s delve deeper into the three main components — Db, QueryBuilder, and Pagination — and explore their features in detail.</p><h3>The Db Class</h3><p>The Db class uses a procedural style for database interactions, which is in contrast to the <a href="#the-query-builder">QueryBuilder</a> that employs a fluent interface.</p><h4>SELECT Query</h4><p>Let’s now build a more complex SELECT query with joins and conditions using some placeholders for the values:</p><pre>// Define the tables and columns to select from<br>$from = &#39;users u INNER JOIN posts p ON u.id = p.user_id&#39;;<br>$where = &#39;u.status = :status AND p.published = :published&#39;;<br>$params = [&#39;status&#39; =&gt; &#39;active&#39;, &#39;published&#39; =&gt; 1];<br><br>// Execute the query<br>$db-&gt;select($from, $where, $params);<br><br>// Iterate over the results<br>foreach ($db-&gt;results() as $row) {<br>    echo $row[&#39;name&#39;] . &#39; - &#39; . $row[&#39;title&#39;] . &#39;&lt;br&gt;&#39;;<br>}</pre><p>In this example, we use the select method of the Db class to execute a SELECT query with joins and conditions. We pass the table names, columns, and conditions as arguments to the method, along with an array of parameters to bind to the placeholders in the query, ensuring that the query is secure and free from SQL injection vulnerabilities.</p><h4>INSERT Query</h4><p>Now, let’s insert a new record into the users table:</p><pre>// Define the table and columns to insert into<br>$table = &#39;users&#39;;<br>$data = [&#39;name&#39; =&gt; &#39;John Doe&#39;, &#39;email&#39; =&gt; &#39;john.doe@email.com&#39;];<br><br>// Execute the query<br>$db-&gt;insert($table, $data);<br><br>// Get the ID of the inserted record<br>$id = $db-&gt;lastInsertId();</pre><p>In this example, we use the insert method of the Db class to insert a new record into the users table. We pass the table name and an associative array of column names and values to insert into the table. The method returns the ID of the inserted record, which we can use to perform further operations.</p><h4>UPDATE Query</h4><p>Next, let’s update an existing record in the users table:</p><pre>// Define the table, columns, and conditions to update<br>$table = &#39;users&#39;;<br>$data = [&#39;status&#39; =&gt; &#39;inactive&#39;];<br>$where = &#39;id = :id&#39;;<br>$params = [&#39;id&#39; =&gt; 1];<br><br>// Execute the query<br>$db-&gt;update($table, $data, $where, $params);<br><br>// Get the number of affected rows<br>$affectedRows = $db-&gt;rowCount();</pre><p>In this example, we use the update method of the Db class to update an existing record in the users table. We pass the table name, an associative array of column names and values to update, and the conditions to apply the update to. We also provide an array of parameters to bind to the placeholders in the query. The method returns the number of affected rows, which we can use to determine the success of the update operation.</p><h3>The Query Builder</h3><p>The QueryBuilder is a powerful component of PowerLite PDO that provides a fluent interface for building SQL queries. Unlike the procedural style of the Db class, the QueryBuilder allows you to chain methods together to construct your queries in a more readable and expressive manner.</p><p>Here’s an example of how you can use the QueryBuilder to select and fetch records from a database:</p><pre>$queryBuilder-&gt;select([&#39;id&#39;, &#39;name&#39;, &#39;email&#39;])-&gt;from(&#39;users&#39;)-&gt;where([&#39;status&#39; =&gt; &#39;active&#39;])-&gt;execute();<br><br>while ($record = $queryBuilder-&gt;fetch()) {<br>    echo $record-&gt;id . &#39;, &#39; . $record-&gt;name . &#39;, &#39; . $record-&gt;email;<br>}</pre><p>In this example, we’re selecting the name and email columns from the users table where the status is active, and ordering the results by name in ascending order. The get method is then used to execute the query and return the results.</p><p>This is just a simple example, but the QueryBuilder is also able to deal with more complex queries with parameters:</p><pre>$queryBuilder<br>    -&gt;select([&#39;id&#39;, &#39;name&#39;, &#39;email&#39;])<br>    -&gt;from(&#39;users&#39;)<br>    -&gt;where([&#39;status&#39; =&gt; &#39;active&#39;])<br>    -&gt;parameters([&#39;limit&#39; =&gt; 10, &#39;orderBy&#39; =&gt; &#39;name ASC&#39;])<br>    -&gt;execute();</pre><p>The QueryBuilder also supports a wide range of SQL operations, including insert, update, delete, and complex join operations, making it a versatile tool for interacting with your database.</p><h3>The Pagination</h3><p>The Pagination component of PowerLite PDO is designed to simplify the process of dividing your query results into manageable chunks, also known as pagination. This is particularly useful when dealing with large datasets that would be impractical to display all at once.</p><p>Here’s an example of how you can use the Pagination component:</p><pre>$from = &#39;users&#39;; // The SELECT FROM clause<br>$fields = [&#39;id&#39;, &#39;name&#39;, &#39;email&#39;]; // The columns you want to select<br>$where = [&#39;status&#39; =&gt; &#39;active&#39;]; // The conditions for the WHERE clause<br>$parameters = [&#39;orderBy&#39; =&gt; &#39;name&#39;];<br><br>$pagination-&gt;select($from, $fields, $where, $parameters);<br><br>// After selecting the records, you can fetch and display them using a while loop<br>$records = [];<br>while ($record = $pagination-&gt;fetch()) {<br>    $records[] = $record-&gt;id . &#39;, &#39; . $record-&gt;username . &#39;, &#39; . $record-&gt;email;<br>}<br>echo implode(&#39;&lt;br&gt;&#39;, $records);<br><br>// show the pagination links<br>$url = &#39;/examples/pagination-examples.php&#39;; // The URL for the pagination links<br>echo $pagination-&gt;pagine($url);</pre><p>In this example, we’re selecting the name and email columns from the users table. We then create a new Paginator instance, passing in the query and the number of items we want per page (10 in this case). The getResults method is used to retrieve the current page of results, and the getLinks method is used to generate the pagination links.</p><p>The Pagination component takes care of all the heavy lifting for you, calculating the total number of pages, the current page, and generating the appropriate SQL to retrieve the current page of results. This allows you to focus on displaying the results and not on the underlying pagination logic.</p><h3>Support and Contribution</h3><p>If you have any questions, suggestions, or feedback, please feel free to <a href="https://github.com/migliori/power-lite-pdo/issues">open an issue</a> on GitHub. You can also contribute to the project by forking the repository and submitting a pull request.</p><h3>License</h3><p>This project is open-source, licensed under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU General Public License v3.0</a></p><h3>Projects</h3><p><strong>PowerLite PDO</strong> is the base tool used for the <strong><em>PHP CRUD Generator</em></strong> project, which has to date about 1,500 users.</p><figure><img alt="CRUD Admin Dashboard — created using PHP CRUD Generator" src="https://cdn-images-1.medium.com/max/1024/1*oI8c0rkoqmWxb16rA2qQrg.png" /><figcaption>CRUD Admin Dashboard — PHP CRUD Generator</figcaption></figure><p>The <strong><em>PHP CRUD Generator</em></strong> is a powerful and easy-to-use tool that allows you to quickly and easily generate a complete <a href="https://www.phpcrudgenerator.com/">PHP CRUD</a> for managing your database. It uses the PHP PDO Database class to provide a simple, intuitive, and flexible interface for performing common database operations. With its user-friendly interface, you can quickly create, read, update, and delete (CRUD) operations for your database, without having to write any code.</p><h3>Discover More</h3><p>PowerLite PDO is not just a tool, it’s a comprehensive solution designed to make your database operations efficient and secure. It’s user-friendly, yet robust and versatile, providing a solid base for all your database needs. It’s capable of handling everything from simple tasks to complex queries and operations.</p><p>Whether you’re working on a small personal project or a large enterprise application, PowerLite PDO is equipped with the features you need. But don’t just take our word for it, explore more about PowerLite PDO in our <a href="https://www.powerlitepdo.com/">official documentation</a> and on our <a href="https://github.com/migliori/power-lite-pdo">GitHub repository</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40d76f5057fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding Tinymce Bootstrap plugin to the Joomla 4 content editor]]></title>
            <link>https://medium.com/@miglisoft/adding-tinymce-bootstrap-plugin-to-the-joomla-4-content-editor-fa7904e9f7db?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa7904e9f7db</guid>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[bootstrap-4]]></category>
            <category><![CDATA[bootstrap]]></category>
            <category><![CDATA[tinymce]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Sun, 24 Apr 2022 18:37:09 GMT</pubDate>
            <atom:updated>2022-04-25T04:55:02.927Z</atom:updated>
            <content:encoded><![CDATA[<h3>Step by step tutorial</h3><figure><img alt="Tinymce Bootstrap plugin" src="https://cdn-images-1.medium.com/max/615/1*Rufk9WsfenC0QKyxWrxnxQ.png" /></figure><h3>Overview</h3><p><a href="https://www.tinymce-bootstrap-plugin.com/"><strong><em>Tinymce Bootstrap plugin</em></strong></a> adds a <strong><em>Bootstrap</em></strong> toolbar to the <strong><em>Tinymce</em></strong> text editor.</p><p>You can then integrate the various elements of the Bootstrap framework into your pages, such as responsive templates, buttons, icons, images, alerts, badges, tables, etc.</p><p>This plugin is not explicitly designed for Joomla, but it is pretty simple to integrate. Here is how to proceed.</p><h3>Prerequisites</h3><ul><li>Joomla version 4.x</li><li>Tinymce Bootstrap plugin version 3.x</li></ul><p>This version of the plugin is designed for Bootstrap 4.</p><h3>Copy the plugin files into Tinymce’s plugins folder</h3><ol><li>Copy the “<em>plugin”</em> folder from “<em>tinymce-bootstrap-plugin/plugin”</em> to “<em>media/vendor/tinymce/plugins/plugin”</em></li><li>Rename “<em>media/vendor/tinymce/plugins/plugin” to </em>“<em>media/vendor/tinymce/plugins/bootstrap”</em></li><li>Copy “<em>tinymce-bootstrap-plugin/register.html”</em> into the “<em>media/vendor/tinymce/plugins/bootstrap” folder</em></li></ol><h3>Register the plugin</h3><ol><li>Open “<em>media/vendor/tinymce/plugins/bootstrap/register.html” </em>in your web browser</li><li>Enter your email and your purchase code to get your registration key</li></ol><h3>Setup the plugin</h3><ol><li>Open “<em>media/plg_editors_tinymce/js/tinymce.js</em>” in your favorite code editor.<br>This file has a “<em>setupEditor</em>” function.<br>The “<em>setupEditor</em>” function sets the “<em>options</em>” for Tinymce.<br>We’ll add the Bootstrap plugin to these options.</li><li>Find the following code part:</li></ol><pre>if (element) {<br>    // We already have the Target, so reset the selector and assign given element as target<br>    options.selector = null;<br>    options.target = element;<br>}</pre><p>3. Add this code just after the previous block:</p><pre>if (typeof (base_url) == &quot;undefined&quot;) {<br>    var base_url = location.protocol + &#39;//&#39; + location.host + &#39;/&#39;;<br>}<br>options.plugins += &quot;, bootstrap&quot;;<br>options.toolbar += &quot; | bootstrap&quot;;<br>options.contextmenu = &quot;bootstrap&quot;;<br>options.bootstrapConfig = {<br>    url: base_url + &#39;/media/vendor/tinymce/plugins/bootstrap/&#39;,<br>    iconFont: &#39;fontawesome5&#39;,<br>    imagesPath: &#39;/images&#39;,<br>    key: &#39;paste-your-key-here&#39;<br>};</pre><p>4. Substitute the ‘<em>paste-your-key-here</em>’ with your generated code from step 1</p><p>5. Customize the code according to your needs. You can set up some other options if you will. The <a href="https://www.tinymce-bootstrap-plugin.com/documentation/index#configuration">plugin’s documentation</a> gives some examples.</p><h3>Minify the configuration file</h3><p>Replace the content of “<em>media/plg_editors_tinymce/js/tinymce.min.js</em>” with the content of “<em>media/plg_editors_tinymce/js/tinymce.js</em>,” then minify the code (you’ll find many online tools to minify Javascript on the internet if you need).</p><h3>Enjoy!</h3><p>I hope you’ll appreciate the Tinymce Bootstrap plugin. Any feedback is welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa7904e9f7db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MySQL database relationships explained]]></title>
            <link>https://medium.com/@miglisoft/how-to-manage-mysql-database-relations-3191fde304?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3191fde304</guid>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[mysql-workbench]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[relationships]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Wed, 13 Apr 2022 18:04:51 GMT</pubDate>
            <atom:updated>2022-04-16T04:18:19.310Z</atom:updated>
            <content:encoded><![CDATA[<h4>Direct and indirect relations, one-to-one, one-to-many, many-to-many</h4><figure><img alt="How to manage MySQL database relations" src="https://cdn-images-1.medium.com/max/1024/1*pnXEHfHmK1i54zt4PHdXdA.png" /></figure><p>The relationships between the different tables in a MySQL database must reflect the logical data structure.</p><p>It is therefore essential to understand the different kinds of relationships.</p><p>Here we&#39;ll explain the different kinds of <strong>MySQL relationships</strong>.</p><p>To learn how to set up your database relations, please visit <a href="https://www.phpcrudgenerator.com/tutorials/how-to-build-up-your-database-with-mysql-workbench"><em>How to build your database with MySQL Workbench</em></a>.</p><h3>The different kinds of relationships in a MySQL database</h3><p>Let&#39;s consider a database containing <em>products</em>, <em>customers,</em> and their <em>orders</em>.</p><p>Each <em>order</em> belongs to a <em>customer</em> and may contain one or more purchased <em>products</em>. The same <em>product</em> may have been purchased by several different <em>customers</em> or by the same <em>customer</em> in several <em>orders</em>.</p><p>Here&#39;s what our Database schema looks like:</p><figure><img alt="Database schema with relationships" src="https://cdn-images-1.medium.com/max/740/1*4eNuuOnBTm-ohkcKwvNsXw.png" /><figcaption>MySQL database schema example with direct and indirect relationships</figcaption></figure><h3>Direct and indirect relationships</h3><h4>1. Direct relationships (internal relationships) one-to-one, one-to-many</h4><p>A <em>direct</em> relationship between two tables A and B is a relationship where table A is directly connected to table B by a <strong>foreign key</strong>, mandatory or not. This kind of relationship can be <strong>one-to-one</strong> or <strong>one-to-many</strong>.</p><p>In our example, the <em>orders.customers_id</em> field is a <strong>direct relationship</strong> to <em>customers.id</em>.<br>The <em>orders.customers_id</em> is a foreign key.</p><p>This relationship makes it possible to associate each order with a customer.</p><h4>2. Indirect relationships (external relationships) many-to-many</h4><p>An <em>indirect</em> relationship links several records in table A to several records in table B. For this purpose, we use an intermediate table, usually made up of two foreign keys, each allowing us to identify the records of the A and B tables. This relationship is a <strong>many-to-many</strong> relationship.</p><p>In our example, the <em>products_orders</em> table is the intermediate table. It allows us to associate the ordered products with the orders.<br>The <em>products_orders.products_id</em> and <em>products_orders.orders_id</em> are both foreign keys.</p><h3>Identifying and non-identifying relationships</h3><h4>1. Identifying relationships</h4><blockquote>An Identifying relationship can be defined when two tables are joined by the same identifier. In other words, the records in the second table are inherent elements or characteristics of the first table.</blockquote><p>For example, a book is made up of chapters. Each chapter is part of a unique identified book. In this case, the foreign key chapters.books_id will be listed as the <strong>second primary key</strong> of the chapter&#39;s table.</p><p><strong>This type of relationship is nowadays very rarely used</strong>. Instead, an <em>indirect relationship</em> is generally used, which is more generalist and less restrictive.</p><h4>2. Non-identifying relationships</h4><blockquote>A Non-identifying relationship is a relationship where two tables are joined by a common membership or attributes or an inclusion.</blockquote><p>For example, each <em>order</em> belongs to a <em>customer</em>; each <em>order</em> contains one or more <em>products</em>.</p><p><em>Originally published at </em><a href="https://www.phpcrudgenerator.com/tutorials/how-to-manage-mysql-database-relations"><em>https://www.phpcrudgenerator.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3191fde304" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create PHP/HTML Web Forms the right way]]></title>
            <link>https://medium.com/@miglisoft/how-to-create-php-html-web-forms-the-right-way-b4c5ccb66e23?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4c5ccb66e23</guid>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Mon, 11 Apr 2022 09:11:58 GMT</pubDate>
            <atom:updated>2022-04-11T09:11:58.490Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="PHP Form Builder" src="https://cdn-images-1.medium.com/max/1024/1*n18BG6iw_dnSw-v_WLw6Kg.jpeg" /></figure><p>I will introduce you to the <a href="https://www.phpformbuilder.pro/"><em>PHP Form Builder</em></a> library, a tool for creating HTML web forms in PHP.</p><p>After an overview of the challenges and solutions offered by <em>PHP Form Builder</em>, we will see step by step, as an example:</p><p><strong>How to create a secure contact form with file upload, then send an email with an attachment.</strong></p><h3>Designing a web form properly</h3><p>When you create an HTML form, you must consider various elements, which, once combined, will determine its quality.</p><ul><li>The fields must be organized and presented in a logical way. The layout is essential and must be adapted to all media (“Responsive Design”). In addition, your form should be consistent with your graphic design.</li><li>Wherever possible, you should make it easy for the user to fill in the form. I.e., indicate mandatory fields, point out input errors with real-time control and feedback, and display help texts when necessary.</li><li>The use of Javascript plugins is necessary, at least for real-time validation. It is also strongly recommended date inputs, addresses, telephones, autocompletion, file upload, etc.</li><li>Your form must be accessible. It is essential to provide controls labels and explicitly associate each label with its control. Use the aria-labelledby, role, and title attributes appropriately.</li><li>You must protect your form against attacks (XSS/CSRF) and abuse (use an anti-spam tool if necessary).</li><li>Finally, it is imperative to validate and secure the user data on the server-side, i.e., PHP.</li></ul><p>All this requires specific programming skills and quickly becomes time-consuming. Let’s take a look at how <em>PHP Form Builder</em> can help you.</p><h3>Quick overview of PHP Form Builder</h3><p><em>PHP Form Builder</em> is a form builder designed in PHP. Its development has been continuous since its first release in 2014.<br>It allows you to create all types of forms, from simple to complex.</p><p>You can create your forms in two different ways:</p><ul><li>either in code using the built-in PHP functions,</li><li>or by using the Drag &amp; Drop Form Builder (“no-code”)</li></ul><p>The aim here is to give a quick overview of the functionality, so we will focus on the Drag &amp; Drop tool. I invite PHP programmers to visit the official website, where you will find complete documentation, many form templates, and code examples.</p><h3>Prerequisites</h3><p>To use PHP Form Builder, you need</p><ul><li>a PHP server</li><li>a valid license, which you can get from the official website</li></ul><h3>Creating the form</h3><p>After uploading the <strong>phpformbuilder</strong> and <strong>drag-n-drop-form-builder</strong> folders to your server, open your browser and go to <strong>/drag-n-drop-form-builder/index.html</strong></p><figure><img alt="Drag &amp; Drop Form Builder screenshot" src="https://cdn-images-1.medium.com/max/1024/1*sac4WbtJd1G1Gx3HDfR87A.png" /></figure><p>We will start by configuring the main settings.<br>Click on the “<strong>Main Settings</strong>” button to open the configuration window.</p><p>Select your preferred CSS framework from the dropdown list: Bootstrap 4/5, Bulma, Foundation, Material Bootstrap, Material Design, Tailwind, UIKit.</p><p>PHP Form Builder will then generate the HTML code for the selected framework in Responsive Design.</p><p>If you wish, change the form’s name, add CSS classes or attributes, and select an icon library.</p><p>Then close by clicking on the “close” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ul8xRiakRZCfB8XqfoDFWQ.png" /></figure><h3>Structure of the form</h3><p>We will now add the following elements to the form:</p><ul><li>name</li><li>first name</li><li>date of birth (with a <em>datepicker</em> plugin)</li><li>email address</li><li>message</li><li>file upload</li><li>anti-spam (Captcha)</li><li>send button</li></ul><h3>Creating the “name” and “first name” fields</h3><p>Click on the “<strong>input</strong>” component in the left sidebar, then drag it into the main area.</p><p>You have just added your first input field. Click on it to display its parameters in the right sidebar.</p><p>In the “<strong><em>parameters</em></strong><em>”</em> area, specify the following values:</p><ul><li><strong>Name</strong>: “user-name”</li><li><strong>Label</strong>: “Full name”</li><li><strong>Placeholder</strong>: “Doe”</li><li><strong>Helper</strong>: “Name”</li></ul><p>Check the “<strong>Required</strong>” checkbox.</p><p>We want to group the name and first name on the same line, so in the “<strong>width</strong>” dropdown, we’ll select “<strong>66%</strong>”.</p><p>Then add a new “<strong>input</strong>” field by dragging the component from the components to the central area as before, and enter its parameters:</p><ul><li><strong>Name</strong>: “user-firstname”</li><li><strong>Label</strong>: “” (leave the label blank)</li><li><strong>Placeholder</strong>: “John”</li><li><strong>Helper</strong>: “First name”</li><li><strong>Width</strong>: “33%”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BcpIm0ZZcPvjFq-aHzNj-Q.png" /></figure><h3>Preview</h3><p>Now that we have chosen our framework and created the first fields, it is time to see what it will look like.</p><p>Click the “<strong>Preview</strong>” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JMK_Yt-vlYyR7gdn5qr6TQ.png" /></figure><p>The preview window displays your form with all its features, which you can test in real-time.</p><p>The “<strong>name</strong>” field is mandatory. PHP Form Builder has automatically added an asterisk to indicate this.</p><p>You can also see that real-time validation is automatically enabled.</p><p>The help texts and placeholders are in place; the fields are overlaid if we reduce the window’s width.</p><p>That’s fine. Let’s continue.</p><h3>Adding the “Date of birth” field</h3><p>Create a new “<strong>input</strong>” field, then in the parameters, specify:</p><ul><li><strong>Type</strong>: “date”</li><li><strong>Name</strong>: “user-birth-date”</li><li><strong>Label</strong>: “Birth date”</li></ul><p>Still, in the “<strong>settings</strong>”, click to open the “<strong>plugins</strong>” tab.</p><p>Select the “<strong>Litepicker</strong>” plugin from the dropdown list.</p><p>There are many settings available. A tooltip allows you to see what each one corresponds to.</p><p>We will set up the date picker plugin as follows:</p><ul><li><strong>Dropdown min year</strong>: 1900</li><li><strong>Dropdown months</strong>: Yes</li><li><strong>Dropdown years</strong>: Yes</li></ul><p>Click the “Preview” button again to see how it looks.</p><figure><img alt="Form preview with the date picker plugin" src="https://cdn-images-1.medium.com/max/1024/1*H07Q0M64nqx1GlkHOLh-wg.png" /></figure><p>Adding a Javascript plugin to a form field is usually not a piece of cake. First, you have to research which plugin will meet your needs, load the files from the HTML page, read the documentation, write the Javascript code, test and debug, etc.</p><p>With PHP Form Builder, as you can see, plugin integration is simplified to the extreme.</p><p>Simplified, but not limited. All plugin settings are accessible.<br>And you can test and modify everything in real-time.<br>If you are not satisfied with the result with the “Litepicker” plugin, deactivate it and try another one instead.</p><p>Otherwise, everything is fine. Let’s move on.</p><h3>Email and Message</h3><p>The email and message fields should not be a problem: drag an “input” field and then a “textarea” field and configure them as we saw in the previous steps.</p><p>Let’s see the file upload.</p><h3>File upload</h3><p>Create a “<strong>file-uploads</strong>” directory at the root of your project.</p><p>Then drag and drop a “<strong>File upload</strong>” component into the main area, click it and enter the following parameters:</p><ul><li><strong>Name</strong>: “user-file”</li><li><strong>Label</strong>: “Attach a file”</li><li><strong>Helper</strong>: “Authorized extensions: .pdf, .doc, .docx”</li><li><strong>Extensions</strong>: “pdf, doc, docx”</li></ul><h3>Anti-spam (Captcha)</h3><p>Drag and drop the “HCaptcha” or Recaptcha component as you prefer into the central area.</p><p>Then go to the HCaptcha or Google Recaptcha site to get your keys and enter them in the component’s settings area.</p><h3>Send button</h3><p>Drag and drop a “<strong>Button</strong>” component into the central area.</p><p>Enter the following parameters:</p><ul><li><strong>Text</strong>: “Send”</li><li><strong>Center</strong>: “Yes”</li><li><strong>Class</strong>: a CSS class according to your framework, e.g., “btn btn-primary” if your framework is Bootstrap</li></ul><p>Add an icon if you want with the icon picker.</p><p>Now here’s the final preview of the complete form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHRJaFn8BHuOwgCw9T_pXg.png" /><figcaption>The final contact form</figcaption></figure><h3>Server-side validation (validation in PHP)</h3><p><em>PHP Form Builder</em> has figured out what you need:</p><ul><li>validate the required fields</li><li>validate the email address</li></ul><p>So there is no need to configure anything. <em>PHP Form Builder</em> will generate the code you need.</p><p>Let’s move on to the next step.</p><h3>Sending the email</h3><p>Now everything is ready, all that remains is to send the results by email.</p><p>Open the “<strong>Form Settings</strong>” and go to the “<strong>Form Action</strong>” section.</p><p>In the “<strong>After validation</strong>” section, select “<strong>Send Email</strong>”.</p><p>Then enter the sender’s address, the recipient’s address, and the message’s subject.</p><p>Other options are available. You can also create your email templates in HTML/CSS.</p><p>I forgot to tell you: <em>PHP Form Builder</em> understands that there is a file upload and, therefore, it should be added as an attachment. No worries on that front.</p><h3>Retrieving the code and integrating the form into your project.</h3><p>If you use a <strong>CMS</strong> (<em>WordPress</em> or other), the idea is to <strong>load your form in Ajax</strong>.<br>This way, you can integrate it into an HTML page. I.e., you do not need a <em>.php</em> page.</p><p>In this case, go back to the “<strong>Main Settings</strong>”, “<strong>Ajax Loading</strong>” tab and enable Ajax loading.</p><p>Then click the “<strong>Get Code</strong>” button.</p><p>Then follow the instructions to integrate the different parts of the code into your page.</p><p>If you have not activated <em>Ajax loading</em>, the second tab gives you the code of a complete page with your form inside.</p><figure><img alt="The form code to integrate to your page" src="https://cdn-images-1.medium.com/max/1024/1*aycKbcrdbny2jm8k8BOdTQ.png" /></figure><h3>Conclusion</h3><p>Let’s take a step back and see if we have achieved our objectives, as defined in the “<em>Designing a web form well</em>” section.</p><p>We now have a form designed based on the selected CSS framework that will fit perfectly into our design.</p><p>The fields are well ordered, and the layout is clean and responsive.</p><p>The validation is done in real-time and then in PHP on the server-side.</p><p>Help texts and placeholders are present when necessary.</p><p>Data entry is made easier, especially with the integration of the “<em>Pickadate</em>” plugin to choose the date of birth.</p><p>The file upload is ergonomic and secure.</p><p>We have anti-spam protection.</p><p><em>PHP Form Builder</em> automatically provides XSS and CSRF protection and accessibility attributes.</p><p>As a bonus, it compiles and compresses JS/CSS dependencies for maximum loading speed.</p><p>It’s a bit frustrating to stop there. I would have liked to show you how you can with PHP Form Builder, for example:</p><ul><li>Create conditional fields</li><li>Load dynamic data</li><li>Create stepwise forms</li><li>Create Modals forms</li><li>Enhance your checkboxes, Radio buttons, or Select lists with some fantastic plugins</li><li>etc.</li></ul><p>Maybe next time, who knows.</p><p>Please visit the <a href="https://www.phpformbuilder.pro/">PHP Form Builder website</a> if you’re curious about it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4c5ccb66e23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootstrap 5 Admin Dashboard CRUD in PHP]]></title>
            <link>https://medium.com/@miglisoft/bootstrap-4-admin-dashboard-crud-in-php-a35fdc1473f3?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a35fdc1473f3</guid>
            <category><![CDATA[bootstrap]]></category>
            <category><![CDATA[crud]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[admin]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 22:20:23 GMT</pubDate>
            <atom:updated>2024-04-16T04:03:14.975Z</atom:updated>
            <content:encoded><![CDATA[<p>Generate a Bootstrap 5 Admin Dashboard with CRUD Operations in a few clicks — <a href="https://www.phpcrudgenerator.com/">https://www.phpcrudgenerator.com</a></p><p>PHP CRUD Generator is an easy-to-use Web Application for creating a complete Bootstrap 5 Admin Dashboard for any project using a MySQL database.</p><figure><img alt="PHP CRUD Admin dashboard screenshot" src="https://cdn-images-1.medium.com/max/1024/1*oI8c0rkoqmWxb16rA2qQrg.png" /><figcaption>PHP CRUD Admin dashboard screenshot — List of records from database</figcaption></figure><p>The application is separated into two parts: the CRUD Generator and the Admin Panel for the final user.</p><p>The CRUD Generator scans your database: structure, tables, fields and relationships.</p><p>All you have to do is select your options to create all the pages of the admin dashboard: lists of records, creation forms, editing forms, deletion forms.</p><p>The system is extremely complete and can be customized easily, allowing you to deal with any situation.<br>Lists can be filtered, the admin panel includes an authentication and user rights management module.</p><p>The full demo is available online. PHP CRUD Generator is sold at a ridiculously low price in comparison to the amount of work it will save you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a35fdc1473f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a Bootstrap 5 Admin Dashboard without programming]]></title>
            <link>https://medium.com/@miglisoft/how-to-create-a-bootstrap-4-admin-dashboard-without-programming-c7fbd17ad964?source=rss-2266609133e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7fbd17ad964</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[bootstrap-4]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[admin-dashboard]]></category>
            <dc:creator><![CDATA[Migli]]></dc:creator>
            <pubDate>Fri, 12 Jul 2019 14:44:49 GMT</pubDate>
            <atom:updated>2024-04-16T04:03:59.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0oK1ZnHeanFUIioYUPCzyg.png" /><figcaption>Bootstrap 4 Admin Dashboard — built with PHPCG</figcaption></figure><h3>About PHP CRUD Generator</h3><p>PHP CRUD Generator is a pure PHP application and allows you to build Bootstrap 5 admin panels using an online User Interface.</p><p>If you have a project using a MySQL database and a PHP server, then PHPCG is perfect for you.</p><h3>How it works?</h3><ol><li>Go to <a href="https://www.phpcrudgenerator.com/">https://www.phpcrudgenerator.com</a> and buy a license at a ridiculous price and download the package</li><li>Upload the directories to your server, then follow the installation process from your web browser</li><li>Then open PHP CRUD Generator in your web browser</li></ol><h3>Create your Admin Panel in PHP with CRUD Operations</h3><p>The interface includes 3 tabs: Build READ list, Build CREATE/UPDATE forms, Build DELETE forms.</p><figure><img alt="CRUD operations" src="https://cdn-images-1.medium.com/max/616/1*-wct6-ATXRwWP13N0nud2Q.png" /></figure><p>The system analyzes the database structure in a smart way and detects tables, field types and properties and all types of relationships.</p><p>In each tab, you just haveto choose your options and preferences and then validate to create the Bootstrap administration panel.</p><p>The generated administration interface uses a very clean MVC structure.</p><p><strong>For each table</strong>:</p><ul><li>a main PHP class</li><li>3 forms (PHP Form Builder — <a href="https://codecanyon.net/item/php-form-builder/8790160">https://codecanyon.net/item/php-form-builder/8790160</a> — is included in the package)</li><li>a Twig template for rendering the list.</li></ul><p><strong>PHP CRUD Generator</strong> is very powerful and has involved several years of progressive development. Among other core features:</p><ul><li>Built entirely with <strong>Bootstrap 5 </strong>+ <strong>jQuery</strong></li><li>Authentication module for the admin panel</li><li>Intelligent field validation</li><li>User and profile management with advanced management of individual rights</li><li>Integrated and configurable jQuery plugins: File uploader, Date &amp; Time pickers, TinyMce, …</li><li>Visual organization of the navigation bar</li></ul><p>The <strong>fully functional demo</strong> is available here: <a href="https://www.phpcrudgenerator.com/admin/home">https://www.phpcrudgenerator.com/admin/home</a></p><h3>Screenshots</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35QlvADRIC5_AthCuLVzcA.jpeg" /><figcaption>PHP CRUD Generator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*zMwdx3KxkF1nteDA5Mxi9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*og4ZbVFjKi30uUoUxv7LOw.png" /><figcaption>Bootstrap Admin Dashboard sample — Sandstone theme</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUIDDN1u1Y6aRIEvJ4qYBQ.png" /><figcaption>Bootstrap Admin Dashboard sample — Darkly theme</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*dLjY4SDJTyQ59-sFlM7jTQ.png" /><figcaption>Subscribe to PHP CRUD Generator Youtube Channel at <a href="https://bit.ly/2JwWj2E">https://bit.ly/2JwWj2E</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7fbd17ad964" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>