+5 votes
300 views
Tools for web development - phpscaffold

in Databases by (552k points)
reopened | 300 views

1 Answer

+3 votes
Best answer

Phpscaffold is a crud generator that is entering the data of a table this software will be responsible for generating all the code to list, create, edit, save and delete data in a mysql database, facilitating the development for tests and rapid demos.

The software can be used online or downloaded from http://www.phpscaffold.com/

The first thing will be to create a database and a table to make an example or if we have a database we can use it. In this case we will use a customer table.

We export the database to sql from phpmyadmin or the mysql manager that we like

 CREATE TABLE `clients` ( `idcustom` int (100) NOT NULL AUTO_INCREMENT, `name` varchar (255) DEFAULT NULL, `domicile varchar (255) DEFAULT NULL, `telefono` varchar (50) DEFAULT NULL, `province` varchar (255) DEFAULT NULL, `city` varchar (255) DEFAULT NULL, `email` varchar (255) DEFAULT NULL, PRIMARY KEY (`clientname`), KEY `clientname` (` customername`) ) ENGINE = MyISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT = 1; 

. Once we have the sql text we paste it into the phpscaffold text box .

image
Then he shows us some pages that he created with that data, we can edit the names right there

config.php // Configuration and connection to database
id // Primary key of the table we can change it in our case is idcliente
list.php // list of fields in the table in this case list of clients
new.php // Register a new record
edit.php // modify a record
delete.php // delete a record

Therefore, we are going to click on the button Make My Pages (Make my pages)

At the end, it presents the code of each separate page for us to copy and generate the corresponding php file or download the files to a directory of our web project.

image


image


So we can see a generic database connection file
 // server connection $ link = mysql_connect ('localhost', 'user', 'password'); if (! $ link) { die ('Not connected:'. mysql_error ()); } //database if (! mysql_select_db ('dbclientes')) { die ('Can \' t use foo: '. mysql_error ()); } 


We see for example the generated file list.php

 <? include ('config.php'); echo "<table border = 1>"; echo "<tr>"; echo "<td> <b> CustomerID </ b> </ td>"; echo "<td> <b> Name </ b> </ td>"; echo "<td> <b> Address </ b> </ td>"; echo "<td> <b> Phone </ b> </ td>"; echo "<td> <b> Province </ b> </ td>"; echo "<td> <b> City </ b> </ td>"; echo "<td> <b> Email </ b> </ td>"; echo "</ tr>"; $ result = mysql_query ("SELECT * FROM` clients` ") or trigger_error (mysql_error ()); while ($ row = mysql_fetch_array ($ result)) { foreach ($ row AS $ key => $ value) {$ row [$ key] = stripslashes ($ value); } echo "<tr>"; echo "<td valign = 'top'>". nl2br ($ row ['idcliente']). "</ td>"; echo "<td valign = 'top'>". nl2br ($ row ['name']). "</ td>"; echo "<td valign = 'top'>". nl2br ($ row ['address']). "</ td>"; echo "<td valign = 'top'>". nl2br ($ row ['phone']). "</ td>"; echo "<td valign = 'top'>". nl2br ($ row ['province']). "</ td>"; echo "<td valign = 'top'>". nl2br ($ row ['city']). "</ td>"; echo "<td valign = 'top'>". nl2br ($ row ['email']). "</ td>"; echo "<td valign = 'top'> <a href=edit.php?id={$row['id']}> Edit </a> </ td> <td> <a href = delete.php? id = {$ row ['id']}> Delete </a> </ td> "; echo "</ tr>"; } echo "</ table>"; echo "<a href=new.php> New Row </a>"; ?> 

We see a list of customer with the options to edit delete and new without having written a line of code if we remove some columns of the previous code to see how to customize the design.

image



Finally with some icons and some CSS styles for the rows and titles of the table we can have something like that in a few minutes.

image


The other files are all the same php code and tables that can be transformed into div and translated into other languages ​​as well. The phpscaffold API is MIT licensed, so any of its libraries can be modified at will to investigate this tool.

by (3.5m points)
edited

Related questions

+3 votes
1 answer
asked Jun 24, 2019 in SEO by backtothefuture (552k points) | 216 views
+5 votes
1 answer
+5 votes
1 answer
asked Nov 9, 2021 in macOS by backtothefuture (552k points) | 128 views
+5 votes
1 answer
asked Jun 23, 2019 in SEM by backtothefuture (552k points) | 191 views
+5 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users