David MacAree – ProjectArchive.NET

Published by : David MacAree

How to check if a button is pressed.

How to check if a button is pressed using php .. ๐Ÿ™‚ if (isset($_POST[‘button’])){ echo “button pressed”; } else { echo “button not pressed” ; } <form class=”form-horizontal” action=”check_button_pressed.php” method=”post”> <div class=”form-group”> <div class=”col-sm-offset-2 col-sm-10″><button class=”btn btn-default” name=”button” type=”submit”>Test</button></div> &nbsp; </div> &nbsp; </form>&nbsp; Will on button click display button pressed .. ๐Ÿ™‚

Minecraft’s Story Mode is now free on Windows 10

Microsoft has just released the first episode of Minecraft Story Mode for free on Windows 10. It is now availble for download via the windows store at no cost. ๐Ÿ™‚ Just open your official Microsoft Windows store and search for Minecraft: Story Mode – A telltale game series. Enjoy  

Building an API

Imagine if you could take an existing sql database and turn it into a RESTful JSON based web service, then access the data via the API from perhaps an android application or an other third party application.ย  I wondered about this and then I stumbled upon PHP DATA SERVICES (PHPDS) built by Chatura Dilanย  PHPDS

Use PHP to zip (archive) a folder

Here is a very simple way to use PHP to zip up (archive) a folder.

How to get address URL

How to get the full address URL using PHP .. /**** * Get the url address */ function getAddress() { // check for https $protocol = (isset( $_SERVER[‘https’]) == ‘on’ ? ‘https’ : ‘http’); //return address return $protocol.’://’.$_SERVER[‘HTTP_HOST’].$_SERVER[‘REQUEST_URI’]; } //usage echo getAddress(); Will output the full URL ๐Ÿ™‚