WELCOME TO POS FOR CAFE

Mobile POS and touch screen restaurant POS systems

POS for cafe, POS software, POS Cafe, point of sale software, Cafe POS, best POS software, POS India, retail POS, POS Software India, POS, POS System, retail software Chennai, inventory software, invoice software, POS software Chennai, retail software 2016, best retail software, best retail software ahemdabad, retail point of sale software, retail POS software India, retail store software, retail shop management software, retail store management software, inventory POS, online and desktop retail POS software, point of sale software India, retail shop software, retail software check out http://www.pos-for-cafe.com/

Pos for cafe is provide cafe POS, restaurant, Cafe Shop management software, iPad POS, mobile POS and touchscreen restaurant POS systems in India at affordable cost. Pos-For-Cafe is the cloud-based POS software designed for easy use.

POS Cloud Solution by Lithe Technologies Pvt Ltd.

Inventory System Pos for cafe understand that cafe are small stores but they are highly dependent on efficient inventory system for better revenue. Data Analytics A POS which is carefully crafted t…

Source: Pos For Cafe Feature


website development in ahmedabad i365design.com

website development in ahmedabad i365design.com


About I365 Design.


I365 Design logo

Website Development in ahmedabad, php expert in ahmedabad, software development in ahmedabad, web development in ahmedabad, domain and hosting in ahmedabad

“You dream it… We blueprint it!”

Advancement, creativeness, excellent, promptness and sufficient are the main mantras of I365 Design and these are shown in our performance.

I365 Design provides wide range of digital solutions that include web page styles, website development, E-commerce Development, mobile development, custom web development, social development, graphic designing, animation development that allow the development of a natural and smooth on the internet experience. Company Based in Gujarat, India & Nairobi, Kenya. I365 design is a Web Development Company worldwide recommended for its professional approach and excellent of performance.

We at I365 Design ensure a perfect combination of innovative perspective, efficient specialized knowledge and strong Objective of Success while creating tailor-made market alternatives for our customers.

It requires an individual only for a few moments to gauge the geniality of a website! And 8 out of 10 folks assess the reliability of a web page depending on its design!

In easier conditions, it is important that your web page performs as hard as you do, for your business. An excellent style improves the transformation by huge margin and provides a user-friendly encounter that obliges the guest to become client. Excellent web page is just like your smart Creativity. It forms your Identity with your clients, improves your product and cultivates your main objective.

What We Do

  • Website Design

  • Creative Web Design

  • Web Design Studio

  • Flash Website Design

  • Online Video Sites

  • Multilingual Websites

  • Web Application Development

  • Social Network Systems

  • Enterprise Application Development

  • Microsoft Sharepoint Server Consulting

  • Biz Talk Server Development

  • Customized Web Applications

  • Dashboards

  • Business Intelligence

  • CMS

  • E-Learning Solutions

  • Software Development

  • Software as a Service – Saas

  • Flash Game Development

  • CRM

  • ERP

  • Ecommerce Web Design

  • Ecommerce Web Development

  • Ecommerce Shopping Cart

  • Magento Development

  • Secure Online Shopping

  • Multilingual Ecommerce

  • Multi-Currency Ecommerce

  • Multiple Payment Gateways

  • OSCommerce

  • Mobile Application & Website

  • Iphone Application Development

  • Ipad Application Development

  • Android Application Development

  • Windows Mobile Application Development

  • QR (Quick Response Code Reader)

  • Customized Sales Application

  • Social Commerce

  • Graphic Design

  • Logo Design

  • Banners

  • Print Design

  • Brochure Design

  • Newsletters

  • Corporate Identity

  • Strategic Design

  • Brand Building

  • Customized Software


How To Create a File With PHP And Write Content To It

One of my tasks for a project was to create an XML file with simple XML fields to be able to index content in to a Solr Search Core.

So today I will teach you how to create an file with php and write content to it.

Lets get started.

Step 1

Write a function / method that will create the file and write content to it.

function my_file_writer($filename){

// Code goes here
}
Step 2

In this step I want to grab content from my mysql database tables.

function my_file_writer($filename){

// connect to db.
 echo "connecting...
 ";
$con = mysql_connect("localhost","username","password");
 if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
mysql_select_db("database_name", $con) or die('Could not connect: ' . mysql_error());
echo "Connected
 ";
// select  latest articles.
 echo "Selecting data...
 ";
$result = mysql_query("SELECT id, title, content FROM table") or die('Could not select data: ' . mysql_error());
echo "Selected
 ";
}
Step 3

Here we are going to add a while loop to grab the mysql data we selected and put it into the right format for writing it to our file.

function my_file_writer($filename){

// connect to db.
 echo "connecting...
 ";
$con = mysql_connect("localhost","username","password");
 if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
mysql_select_db("database_name", $con) or die('Could not connect: ' . mysql_error());
echo "Connected
 ";
// select  latest articles.
 echo "Selecting data...
 ";
$result = mysql_query("SELECT id, title, content FROM table") or die('Could not select data: ' . mysql_error());
echo "Selected";
$stringData = ""; // we put the first part of the $stringData variable outside the loop
 while($row = mysql_fetch_array($result))
 {
// set variables
 $page_id = $row['id'];
 $page_url = $row['url'];
 $pagetitle = $row['title'];
$bodytext = $row['content'];
 $bodytext = strip_tags($bodytext); // Here we strip all html tags from the body text
$stringData .= "
 $page_id
http://your-url-here.com/pagename
 $pagetitle
 $bodytext
\n\n";
} // end of while loop
$stringData .= ""; // we put the final part of the $stringData variable at the end outside of the while loop
}
?>
Step 4

In this step we start creating and writing to the file.

$fh = fopen($filename, 'w'); // we create the file, notice the 'w'. This is to be able to write to the file once.

 fwrite($fh, $stringData); // here we write the data to the file.
 echo "Writing file...
 ";
echo "Closing file...
 ";
 fclose($fh); //here we close our file
echo 'Finished!';
Step 5

all thats left to do is to close the mysql connection.

mysql_close($con); // close the connection

Step 6

Now you can create your file and run the script.

my_file_writer("Your_File_Name.xml");

Conclusion

As you can see it’s really easy to create a file and add any content you want to it. You should be able to see a file with the name you gave it after you ran your script. Any suggestion is welcome.


PHP API Development: Dreaming Of Your Own API? Make It Possible Today!

I have often dreamed of creating an API for one of my sites but I’ve always set it aside as I thought it would be too much work to do. One day I just decided it’s time to do the research and get started with building my own API and it wasn’t as difficult as I thought.

So you are probably eager to start with this one? OK I’ll show you how!

First thing, you need to have a database in place with data. I’m not going to show you how to build a database with tables as it’s one of the basics you need to know. I’m sure most of you are past the basics.

The first part of the code

if($_GET['q'] == "all" && $_GET['type'] == 'json'){

//get a connection to mysql
$con = mysql_connect("localhost","root","root") or die("could not connect".mysql_error());
//select your database table
mysql_select_db("android_maps", $con) or die("Could not select database".mysql_error());
//get your results with a mysql query
$result = mysql_query("SELECT gmaps.*, urls.* FROM gmaps, urls WHERE urls.idgmaps = gmaps.idgmaps") or die(mysql_error());
//run a while loop get your data.
while($place = mysql_fetch_array($result, MYSQL_ASSOC)) {
$places[] = array('location'=>$place);
}
$output = json_encode(array('map' => $places));
echo $output;
mysql_close($con);
}

First off we select all data from our database. You can set search criteria for different results for example for getting particular users details from your social network, but in this example we select everything.

In the example above I select all data from my android maps app database for locations and places. We then do some JSON encoding to put the data in the correct format. All you need to do to use the output data is to grab it and use a JSON decode method

The output of the data in JSON format.

{“map”:[{“location”:{“idgmaps”:”15″,”lat”:”-25.926813935317035″,”lon”:”27.828453713378963″,”address”:”cradle of human kind”,”title”:”Cradle of Humankind”,”description”:”The 47 000-hectare Cradle of Humankind is blessed with a greater wealth of early human history than almost any other place on earth. \r\n\r\nThe Cradle contains more than twelve major fossil sites and dozens of minor ones. The Maropeng Visitors Centre at the Cradle of Humankind (near Johannesburg) was opened in 2005. The tumular building is designed to look like an ancient burial mound, though from the rear it looks like a modern structure. \r\n\r\nInside, a journey through the evolution of life is presented, and the architecture is symbolic of this journey. Maropeng means returning to the place of origin in Setswana, the local indigenous language. It is a reminder that the ancestors of all humans, wherever they live today, originally came from Africa.”,”tags”:”Maropeng, Cradle of Human Kind, Early Humans”,”idurls”:”17″,”url_name”:”Early humans”,”url”:”http:\/\/newhistory.co.za\/part-1-chapter-1-early-humans\/”}}

 

The second part of the code

In this part we switch the data format to output XML.

elseif($_GET['q'] == "all" && $_GET['type'] == 'xml'){

//get a connection to mysql
$con = mysql_connect("localhost","root","root") or die("could not connect".mysql_error());
//select your database table
mysql_select_db("android_maps", $con) or die("Could not select database".mysql_error());
//get your results with a mysql query
$result = mysql_query("SELECT gmaps.*, urls.* FROM gmaps, urls WHERE urls.idgmaps = gmaps.idgmaps") or die(mysql_error());
//run a while loop get your data.
while($location = mysql_fetch_array($result)) {
$output = '<?xml version="1.0" encoding="utf-8"?>';
$output .= '<data>';
$output .= "<lat>".$location['lat']."</lat>";
$output .= "<long>.".$location['lon']."</long>";
$output .= "<description>.".$location['description']."</description>";
$output .= '</data>';
print $output;
}
mysql_close($con);
}else{
echo "<h1>No results to show for you query</h1>";
}

The second par t of the code we switched over to XML output. The only big difference is the elseif and the XML tags I added in the while loop.

Here’s the complete code.

<?php

if($_GET['q'] == "all" && $_GET['type'] == 'json'){
//get a connection to mysql
$con = mysql_connect("localhost","root","root") or die("could not connect".mysql_error());
//select your database table
mysql_select_db("android_maps", $con) or die("Could not select database".mysql_error());
//get your results with a mysql query
$result = mysql_query("SELECT gmaps.*, urls.* FROM gmaps, urls WHERE urls.idgmaps = gmaps.idgmaps") or die(mysql_error());
//run a while loop get your data.
while($place = mysql_fetch_array($result, MYSQL_ASSOC)) {
$places[] = array('location'=>$place);
}
$output = json_encode(array('map' => $places));
echo $output;
mysql_close($con);
}elseif($_GET['q'] == "all" && $_GET['type'] == 'xml'){
//get a connection to mysql
$con = mysql_connect("localhost","root","root") or die("could not connect".mysql_error());
//select your database table
mysql_select_db("android_maps", $con) or die("Could not select database".mysql_error());
//get your results with a mysql query
$result2 = mysql_query("SELECT gmaps.*, urls.* FROM gmaps, urls WHERE urls.idgmaps = gmaps.idgmaps") or die(mysql_error());
//run a while loop get your data.
while($location = mysql_fetch_array($result2)) {
$output = '<?xml version="1.0" encoding="utf-8"?>';
$output .= '<data>';
$output .= "<lat>".$location['lat']."</lat>";
$output .= "<long>.".$location['lon']."</long>";
$output .= "<description>.".$location['description']."</description>";
$output .= '</data>';
echo $output;
}
mysql_close($con);
}else{
echo "<h1>No results to show for you query</h1>";
}
?>
Hope you enjoyed this tutorial. Please leave a comment, let me know what you think?

Appending data to a MySQL database field that already has data in it

Need to “add” data to a field that already contains data without erasing whats currently there. For example if the field contains HTML, I need to add additional HTML to the field. Is there a SQL call that will do this or do I need to call the data in that field, concatenate the new data to the existing data, and reload it into the database?

Yes you can use the following query to append data to database field.

UPDATE Table SET Field=CONCAT(Field,'your extra html');
and you can also do it with specific where condition
UPDATE myTable SET html=concat(html,'<b>More HTML</b>') WHERE id='10'