Wednesday, 8 November 2017

How to Optimise A Contact Page With Email Notification Using BootStrap and AJAX/PHP

Whao... Here we are again, it's been a long time I feed my readers with a good post. I have been busy programming for the web. I've been writing a lot of code lately but I did something recently that really got my inner man saying "you have to share this with fellow developers". Yes this post is for developers, especially beginner developers. I'm currently working on an e-commerce project that required me to code from scratch using only bootstrap and Jquery framework. I've done much, as a matter of fact the project is 80% completed. What I'm about to share with you is actually a trivial part of the project compared to others tasks such as online payment integration. It's trivial but cool. 

So what am I talking about? It is the contact page of Future Cooperative Stores. Below is a screen shot of the page and the circled portion is what I want to put you through.  It is a quick note form that allow user to send a quick message to the company. 




The popular implementation of this is storing the information in a database which may not be seen until after some time. When users and prospective customers send this kind of messages and don't get a feed back in the next few hours, it may give a negative impression about the customer service of an e-commerce firm. So, after storing the information in a database, an email is sent to whoever is in charge. The email contains all the information filled in by the user. Let's say I filled the form with some information as shown below: 



After storing the information in the database, my web app will send and email that reads A quick note "I want know more about this company" was sent from Ayodele Olufemi with phone number: 07063251851 and email: ayodeleolufemi86@gmail.com. Please attend to it quickly.


 That's cool right? The person in charge of handling this note is notified on the fly via email. The user get feedback in time and encouraged to patronize the company.
This is done very fast with the help of JavaScript and Ajax without reloading the page. A bootstrap modal is used to notify the user when the message is sent. PHP is used to store the data entered into MySQL database as well as send email but the process is very fast. The process asynchronous, behind the scene. So how was I able to accomplish this? Read on to find out.

 The Codes

 For this implementation, you need to have J QUERY and Bootstrap frameworks. You can search google to download them if you don't have them. Also your database connection have to be set. I will go on to explain the code structure.  

 
Database Connection
This is not new to the PHP gurus. For reference purpose the database connection (dbconn.php) is as follows:


$user = 'root'; $password = 'password'; $dbase = 'myDb';


$dblink = mysqli_connect('localhost', $user, $password, $dbase);

if (!$dblink) {
    die(('Connect Error ('.mysqli_connect_errno().') '. mysqli_connect_error()));
}

?>


The database connection is just a format. You have to replace the password and other parameters with your database settings. Of course you don't expect me to reveal my settings.


Table Structure
The table structure can be created with the SQL below. Just dump it in your SQL editor and run it. This is just to illustrate how I accomplish this task. You can modify it to your taste.

CREATE TABLE `quicknotes` (
  `id` int(11) NOT NULL,
  `fullname` varchar(70) NOT NULL,
  `email` varchar(70) NOT NULL,
  `phone` varchar(15) NOT NULL,
  `message` text NOT NULL,
  `datetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `quicknotes`
--


--
ALTER TABLE `quicknotes`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `quicknotes`
--
ALTER TABLE `quicknotes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;


Form Processors
The form is processed by two files; a JavaScript file (ajax-pro.php) and a PHP file (cp.php). The JavaScript file takes the information entered using the id from each input tag and send them to cp.php for database operations and email notification using AJAX and J QUERY. The ajax-pro.js also validate the form and manipulate the message modal in when response is gotten from cp.php. below is the content of the ajax-pro.js file. 

$(document).ready(function() {

    //Submit 'Add New' form
    $('#addNewForm').on('submit', function(e) {
        $('#addNewBtn').html(' Sending Message...');
        //Disable button
        e.preventDefault();
        $('#addNewBtn').prop('disabled', true);

        //Remove spaces inputs
        var fullname = $.trim($('#fname').val());
        var email = $.trim($('#email').val());
        var msg = $.trim($('#msg').val());
        var phone = $.trim($('#phone').val());

        // Start validation;
        if (fullname !== '' && email !== '' && msg !== '' && phone !== '')
        {
          $('#errorMsgNew').addClass('hidden');

          $.ajax({
            type:'post',
            url:"cp.php",
            data: $('#addNewForm').serialize(),
            success: function() {
                $('#addNewBtn').html('Send');
              $('#message').html('Message sent successfully! Thanks');
              $('#msge').modal('toggle');
              $('#fullname, #email, #msg, #phone').removeClass('correctinput');
              $('#fullname, #email, #msg, #phone').removeClass('errorinput');
              $('input, textarea').val('');
              $('#errorMsgNew').addClass('hidden');
              $('#addNewBtn').removeProp('disabled');
            },
          });

        }
        else
        {
          $('#fullname, #email, #msg, #phone').addClass('errorinput');
          $('#errorMsgNew').html(' Fill all fields');
          $('#errorMsgNew').removeClass('hidden');
          $('#addNewBtn').removeProp('disabled');

        }
    });
   
});
   
    

What follows is the content of our cp.php file. 

 include_once('dbconn.php');
/* include_once('assets/inc/navbar.php');
$brandMan = new Main;
$navbar = new Navbar; */


$fname = mysqli_real_escape_string($dblink, trim($_POST['fname']));
$email = mysqli_real_escape_string($dblink, trim($_POST['email']));
$phone = mysqli_real_escape_string($dblink, trim($_POST['phone']));
$message = mysqli_real_escape_string($dblink, trim($_POST['msg']));

mysqli_query($dblink, "INSERT INTO `quicknotes` (`fullname`, `phone`, `email`, `message`) VALUES ('$fname', '$phone', '$email', '$message')") or die($this->dbError(mysqli_error($dblink), $_SERVER['PHP_SELF']));

$to = 'feminiscence@gmail.com';
$subject = "New Quick Note";
$header = "FCS: Quick Note";
$message = "A quick note \"". $message . "\" was sent from " . $fname . " with phone number: " . $phone . " and email: " . $email . ". Please attend to it quickly";

 $sentmail = mail($to,$subject,$message,$header);

?>


 Take note of the first line that include the database connection file we created earlier. This is important for storing form data to database. 

Conclusion 
If all is properly set and you carefully follow the this tutorial, your implementation will work fine. Apart from the email optimization, this is a very good way of processing a form. It is fast and seamless. Please do not hesitate to drop your comments/recommendations and questions using the comment box below. Watch out for the SMS version of this tutorial. Instead of getting a mail, the person in charge get notified by SMS. Please share and once again, don't forget to drop your comment. God bless you.

Saturday, 26 August 2017

3 MAJOR WAYS TO TRIPPLE YOUR EARNINGS THROUGH THE INTERNET

Thriving businesses or companies cannot deny the fact that technology plays an important role in their success. Internet technology cannot be ruled out when making plans to move a company forward, no matter how small. It is the key to reaching people you'd never have had the opportunity to come across if websites don't exist. Statistics reveal that there is an ever increasing number of people surfing the internet every second. People share their views and meet others through social media, buy goods and pay for services online from the comfort of their homes, collaborate on projects and a host of other things that has made the internet a necessity. Considering how important the internet is, it will not be out of place to say that any business that does not invest in the internet is aiming for extinction.

The goal of most companies is to make profit, but how can you maximize profit when your goods and services are not getting to the right people? In this post, I'll share with you 3 major ways you can leverage the internet to generate more revenue regardless of what you sell or the services you render. These tips will surely move your business forward if you embrace them and are consistent with them. Here we go.

Create A Website 

A website is basically a collection of related documents rendered through a browser. The different technologies employed in building a website put pieces of these documents together in a web page and display them to a user through the browser depending on the information given or requested. Websites have been helping companies grow as it gives them an edge over their competitors. Firms with neatly designed and interactive websites are perceived to be more professional. This lead to more patronage. Apart from the image it gives the company, it helps to reach much more people especially when it is equipped with good search engine optimization. Let's say you sell shoes and make sales only from people who come to your shop to purchase items. You can create an online shop for your business and have people that are not even close to you order and pay for goods on your website. Imagine 50 people ordering from your website in a day. This will surely increase as your site get more popular.

Call +2347038532564 for Responsive Websites


Invest In Online Advertisement

I just talked about creating a website. The launch of your website should be accompanied by a campaign on the internet. Let social media lovers and search engine users know that something new is out there. The traditional way of doing this is to share the information through your profiles on social networks like FaceBook and Twitter. This is will create some awareness but will not get you what you really want in terms of cash inflow except you're a famous celebrity with very high number of fans following you on social media. Even such people promote their profiles and pages when the need arise. Take advantage of such services as Google Adsense and Ad Words, FaceBook and Twitter Sponsored ads to promote your business. Sometimes all you need to do for a start is to invest as little as 1 dollar daily. This is nothing compared to the returns you'll get if you target the right people. Yes, targeting the right set of people is important. This is why ad networks have enhanced their ads placements process so that your ads will be displayed only to people who have shown interest in services related to the ones you're offering. It is left for you to make use of this enhancements properly. 

Online advertisement also work for individuals who run small businesses and have no website yet. All you need to do is get a good graphics designer to create an ad banner that describe your business and have your contact details embedded. The graphics should be catchy and should clearly state to prospective viewers at a glance what your business is all about.  People don't really have time to snoop through things while surfing the net, so they need to be enticed at first glance. Google ad words also comes in handy if you want to search queries to display links to your website whenever people search for products and services relating to those you offer.

Create and Promote Your Own Social Media Pages

Social media profiles and pages are used to promote brands and personalities as well as create awareness. This is very essential especially if you don't have a website. For instance, a FaceBook page for a business will always update its subscribers when posts are added on the page. One advantage of having a social media profile is that they don't expire except you sell them. If you promote a twitter profile up to the point of having about 100 thousand followers, you are entitled to continue reaping the benefits. The posts you create through such profiles get to reach more people and you can even charge others for ad posts. Pages and groups on FaceBook has turned the life of many around. Just by connecting people of common interest and cause, businesses have thrived and many problems have been been solved. Don't forget that you get much more subscribers to your profiles when you promote them by taking advantage of sponsored packages.

The importance of these three things in making you smile to the bank cannot be over emphasized. Are you thinking of how to go about these three steps? Well you don't have to waste time sweating over them, we can handle them for you at competitive rates and give you social media tips you can leverage at your spare time. It is no news that some internet users especially elderly Nigerians don't like performing transactions on the internet as they are afraid of scammers and internet fraudsters. This is a stumbling block to taking advantage of online ads. We say you don't have to punch in details of your ATM cards online, just contact us and we'll solve your online problems.

Sunday, 21 May 2017

3 Anker Power Accessories Gadget Owners Need to Have

I'm a gadget lover and I'm sure you're also in the same category, that's why you're reading this post. You want to equip your gadgets with extra power right? You've just chosen to read the right post. No one likes it when the fun stops abruptly due to power outage, this is why you need to have some power accessories in place. Thinking of where to get one or which type to buy? Anker accessories comes in handy when it's time to charge up that weak gadget. Let's see why this is so.

Anker Portable Battery

The first product I want to talk about is portable battery from Anker. More precisely
Anker External Battery Power Bank with PowerIQ Technology (2nd Generation). 

There are many other batteries from Anker and other manufacturers but this was carefully picked out for you because the portability, price, and efficiency. The cool features of this product are as follows:
  • The Anker Advantage: Join the 10 million+ powered by our leading technology.
  • Exclusive PowerIQ Technology: Detects your device to deliver its fastest possible charge speed up to 3 amps.
  • Ultra-High Capacity: Charges the iPad Air almost once, the Galaxy S5 two and a half times, the iPhone 5s four and a half times and other smartphones multiple times.
  • Incredibly Compact: Slim, sleek, smartphone-like design featuring a 4-LED power meter. Recharges in 6 hours with a 2 amp adapter (not included) and the included Micro USB cable.
  • What You Get: Anker Astro E3 Portable Charger ​External Battery Power Bank, Micro USB cable, travel pouch, welcome guide, our fan-favorite 18-month warranty and friendly customer service. Lightning cable for iPhone / iPad sold separately. 
Spending $21.99 on an accessories like this guarantees value for your money. You can order it from Amazon here

 Anker Quick Charge 3.0 24W USB Car Charger

Though a one-port charger, this one is picked out for its speed. It is just $10.99 and comes in handy when you need to quickly give your charge your gadget while driving.

http://amzn.to/2q6QuND
Anker USB Car Charger

 This cool accessory which can be ordered from Amazon is packed with the following features:

  • Qualcomm Quick Charge 3.0: Possibly the latest, fastest and most efficient USB charging technology in the world. Up to 4X faster than standard chargers, able to charge compatible devices to 80% in just 35 minutes.
  • Universal Fast Charging: Backwards compatible with Qualcomm Quick Charge versions 1.0, 2.0 & 3.0. Anker's PowerIQ ensures that even non-Quick Charge devices get the fastest charge possible.
  • Certified Safe: Anker's MultiProtect safety system ensures complete protection for you and your devices.
  • What You Get: PowerDrive+ 1 USB Car Charger, welcome guide, 18-month worry-free warranty and friendly customer service. 
Order from Amazon now. Limited stock!

Anker Quick Charger 3.0 60W 6 Port Wall Charger

 You may not be the one-gadget kind of person and may need to strengthen your toys from time to time. Let's say you have a Nintendo Switch game, an iPhone and iPad Pro and even more. It's will be cumbersome to purchase separate chargers for these items. An Anker 6-port quick charger will come in handy. It's really cool to have all your gadgets charged with a single device. Saves space and cost!
http://amzn.to/2qJ2Tua
Anker 6-port Charger


Features are as follows:

  • Qualcomm Quick Charge 3.0: Possibly the latest, fastest and most efficient USB charging technology in the world. Up to 4X faster than standard chargers, able to charge compatible devices to 80% in just 35 minutes.Anker's Advanced-Charging Technology: PowerIQ and VoltageBoost technologies combine in 5 ports to provide the fastest possible charge for non-Quick Charge devices, up to 2.4 amps per port.
  • Family-Sized Yet Compact: With six ports, the Anker PowerPort+ 6 pumps out enough power for the whole family to simultaneously charge multiple devices at high speed. All this is packed into a compact, portable build.
  • What You Get: Anker PowerPort+ 6 (Premium 60W 6-Port USB Charging Hub), 5ft / 150cm detachable power cord, Velcro cable tie, adhesive pad, welcome guide, our worry-free 18-month warranty and friendly customer service. 
 It's $35.99 on Amazon.

 

Friday, 12 May 2017

7 Nintendo Switch Accessories Every Elite Gamer Should Have

My last post announced new stock for Nintendo Switch, if you're yet to get yours please hurry up and order from Amazon. Amazon is the best and most reliable online spot to purchase this video game. This post is for Nintendo switch game owners. I want to introduce to you guys, 7 accessories you can use with your game console. I did not make this compilation all for the sake of promotion or just to drive leads. I want you to have a much more wonderful experience with this game. I mean more value for your money. Not only that, among the seven accessories I'll review are those that will secure your game and make it last longer. Very good examples are the play stand and screen protector. All the products am reviewing are licensed by Nintendo. This means that there is guarantee on quality. You can also opt for fairly used ones on each product's page if you don't have enough money to buy them new. I believe you may not have to do that as most of them are cheap.

 HORI TOUGH POUCH

 As indicated on the product's page on Amazon, this is a sturdy carrying case from Amazon officially licensed by Nintendo. If you're looking for a portable pouch that can house your game cards and other accessories, opt for this. The soft interiors protect your game from scratches while holding it in place. It is made of high quality materials and properly constructed to safeguard switch from anything that will make it look old quickly. We all like that brilliant and slick look of a new video game. Get yours now for just $17.99 at Amazon

http://amzn.to/2qz0X8a
Hori Touch Pad

 SCREEN PROTECTOR

 Sometimes we get carried away while playing in the midst of people and one cannot avoid moments where you mistakenly get hit. It can lead to your console screen getting damaged. You won't have to worry much about this if you purchase this cheap 2 pack of screen protector for Nintendo Switch. It goes for only $8.99. The accessories features are as follows:
  • Specifically designed for Nintendo Switch
  • Ultra-clear High Definition with 99.9% transparency to allow an optimal, natural viewing experience
  • Ultra thin-0.3mm thickness is reliable and resilient, and promises full compatibility with touchscreen sensitivity
  • Highly durable, and scratch resistant - surface hardness 9H and topped with oleophobic coating to reduce fingerprints.
  • Includes: 2x GLASS Screen Protector, Wet/Dry Wipes, Squeeze Card, Easy Installation Use Guide, Dust Removal Sticker.

The good news is that this is a very cheap accessory. Get yours straight from Amazon now for just $8.99. Limited stock.

http://amzn.to/2qzm0aU
Screen Protector for Nintendo Switch 2007

Compact PlayStand

This is another Nintendo-Licensed product. Hori Compact PlayStand for Nintendo Switch prices start from $7.51. Main features are:

  • Play while charging in angled stand
  • Folds up for portability
  • Adjustable angle
  • Rubberized Grips for stability
 Order from Amazon now!

http://amzn.to/2r0G6un
Nintendo Switch PlayStand

Premium Console Case

 I tell you this is another product you should spent your money on. It is not a bad thing at all to part with $10.99 and own this premium case. Main features are:

  • Soft canvas zipper case
  • Stores and protects Switch console
  • Holds up to 14 game cards
  • Includes 1 cleaning cloth 
Limited stock, get yours here


Premium Console Case

  Elite Player BackPack 

You're never a complete gamer without a back pack for your console. We see PC geeks go everywhere with their laptop bags, why wouldn't you as video game enthusiasts want to have one. The Elite Player BackPack is sold for just $41 on Amazon. Main features are:
  • Holds and protects the entire Switch console system
  • Spacious labelled pockets for controllers, dock, cables, and game cards
  • Stores full sized headphones and the Switch Pro Controller
  • Accessories not included 
 Hurry and order yours now.


http://amzn.to/2q8q4xM
Nintendo Switch Elite Player BackPack

Steering Wheel

I introduce to you Joy Con Steering wheel for Nintendo switch from QUN FENG. This pack consist of two steering wheels and sold for $12.99 only. This is considered cheap for a product with a bunch of attractive features listed below. 
  • Designed for Nintendo Switch Specifically - Professional design, super durability of the structural characteristics, Nintendo dedicated.
  • Simple to Use - The simple joy-con controller stuck into the central panel steering wheel attachment, becoming a fully compatible steering wheel handle for all racing games on the Nintendo switches.
  • Perfect for all Racing Games - QUN FENG steering wheel gives you a more realistic driving experience when you like to play the Nintendo switch racing game.
  • PLEASE NOTE - This item includes 2 Joy-Con Wheels(Red and Blue).Joy-Con controllers are not include.Only shown in images for illustrative purposes.
  • Aiming at the problem of the first generation steering wheel which customers reflected,we have to make technical improvements,please rest assured to purchase,if you have any issues,please feel free to contact with the customer service.
  Make your order straight from Amazon. Limited stock!

http://amzn.to/2q8ratf
2 pack of QUN FENG Joy Con Steering Wheel

 The Ultimate Nintendo Switch Starter Kit

This is an all-in-one pack of some basic Nintendo Switch accessories that contains such things as Gel guards, thumb caps, and earbuds. Full features below:
  • Officially licensed by Nintendo
  • Soft canvas zipper case to store and protect console
  • Includes Joy-Con Gel Guards and thumb caps, earbuds, and cleaning cloth
  • Comes with screen protector and applicator
The starter kit can be purchased at Amazon for $29.99.  

http://amzn.to/2pFd9jE
Nintendo Switch Starter Kit
CONCLUSION
This list was compiled based on testimonies from their users. Maximum user satisfaction and safe delivery is guaranteed as long as you purchase using the Amazon links provided. Please share.

Tuesday, 2 May 2017

Nintendo Switch In Stock Again, Order Yours Now!

It's time for you game lovers to get your package of the long awaited Nintendo Switch I talked about in a previous post. Game retailers have stock their stores with this game. Though the game was out for sale earlier but ran out of stock. If you've been waiting for so long to get yours, it's time for you to order.

This game is selling out fast as it is packed with irresistible features. Game retailers such as GameStop can testify to this fact. Eric Bright, an employee of the company said "It's exceeding our expectations. We knew it would be a high-demand product, but our Switch allocations are selling out not in days, but in hours...the demand is so high that consumers have to react quickly to be able to get their hands on them. Right now we're not seeing sales going down at all, and I would expect that to continue for quite some time."

http://amzn.to/2pUd27F
Order and get it shipped to you


 It is expected that Nintendo will produce more to cover demand if they actually learn from what happened in the first month of sale where customers rushed the game beyond expectation. But my is not to rely on uncertainty as demand may grow exponentially. So go get yours now.

Friday, 17 February 2017

Apple Reveals When iOS 11 Will Be Out

The World Wide Developers Conference (WWDC) is an important event for many developers. This annual event features among other things, release date of new software. This year's WWDC will hold on the 5th of June and it most likey that latest updates to iPhone, iPad, and macOS will be showcased.



 I know you're wondering where Apple's WWDC will hold this year. The place is San Jose. Everyone in attendance will have the opportunity to see iOS 11 for the first time. Sources rumored that the new iOS comes with great improvement for voice assistance Siri. It also allow Apple pay transfers between contacts in iMessage. If all this is true, then apple fans will waste no time in grabbing the new software.

Tuesday, 7 February 2017

Why You Should Embrace Amazon Cell Phone Deals and Service Plans

Amazon is an online shopping giant known globally for some competencies. Some of the offers Amazon dishes out to customer are money-saving deals that helps you buy more for less. One of such deals is that of the Amazon Contract Smart Phone Deals. The support that comes with this deal will help you find the right type of phone that suits your lifestyle. 


 With Amazon cell phone deals, you have at your disposal phones from trusted and tested smart phone giants plus Amazon doing the background work to suggest phones that best fit your needs. It is widely known that customer service for contract phones tend to be better because you have committed a year or two and providers will do their best to retain you. Better yet, Amazon offers a hassle-free service plan that make you pay less for anything you. Once you're on this plan, you have assurance of quality service delivery. You get access to such services as TracFone, where you save big on talk, text and data. With as low as $1, TracFone makes SIM activation easy. Why not opt in for this great Amazon Offer.
WhatsApp Dp