How to automate insert data into mysql table - DataPutter.php - SpartaCode

SpartaCode

Make your development faster and easier !

How to automate insert data into mysql table - DataPutter.php


Why ? DataPutter ?

When you create a registration form in Android or IOS. You ofcourse require a php service to store user data in database. 
In such situation we require to create a php file which will accept some parameters with get/post request and then store that data into database.

After successful execution of php service it will return status denoting success or failure.

So, 
Why not automate these coding.
Here comes DataPutter.

DataPutter accepts all column names and their value as parameter and automatically insert data into table you specify.

After successful execution of DataPutter it will return status as output in JSON Array of Object format as shown in image below :



In above image,

RowId : Denotes inserted row ID.


So, to download DataPutter.php go to this link below :


Download DataPutter.php



How to use DataPutter.php ?

Steps :

1. Just supply your database details into DataPutter.php and copy DataPutter.php into your xampp project.
2. Edit database details code to point to your database.
3. Now DataPutter is ready to run.
4. Now go to your Chrome browser in url section type following :

http://localhost/YourProjectName/DataPutter.php?table=YourTableName&ColumnName1=Value1&ColumnName2=Value2

Where,


ColumnName1, ColumnName2,... Denotes names of column in your table specified.


YourTableName Denotes your table name you want to insert data.



Note: 

Replace YourTableName with any table name in your database.
Replace YourProjectName with your project name or folder name.
5. You will get status data in json format.

Thank You
+1 Post and Comment



No comments:

Post a Comment

News

Get Amazing Traffic to your Site

Traffic Exchange

Post Bottom Ad

Responsive Ads Here