Posts

How to connect to Database using PHP

Image
How to connect to Database: Here we will know about the database connectivity on PHP. Firstly we have to check database credential of the server, Usually They are as following: For Local Server (i.e. XAMPP/ WAMPP etc.) Server: localhost Username: root Password:   (blank) For Server  (i.e. cpanel, window etc) Server: localhost  or domain name of the website Username: can be created by Hosting panel using Database wizard (Cpanel) or Option proided on the same Password:  same as above We have to create a database to connect with a particular database for a particular  website or Program. Now we will define all on a variable: <?php $databaseserver = "localhost";   // can be changed as required $databaseuser =  " dbadmin ";   // as exapmle I have taken it dbadmin $databasepassword = "W3help@123";  // as exapmle,  use password as strong, use Capital, small, Number and special Character. Probability of such password guessing is les

Visitor Count for Website in PHP

Hello, Here I am writing a small program in PHP for  checking how much user have visited our website using COOKIES, MYSQL and IP address of the user. First we have to create cookies for the new user. This the code we will use for that: (I have make a cookies for 30 days) setcookie('ipaddress',$_SERVER['REMOTE_ADDR'],time()+(60*60*24*30)); Secondly we have to create a table on database to store the number of Visitors. I have created a table i.e. usercounter with following attribute:  (Initially Insert value with o and 1 on useripid ) useripid   (INT type - AUTO-INCREMENT) lastaddress   (VARCHAR    -   Last visitor IP) userqua   (INT)   (Counter for visitor)  (Initially 0) lastmodified   (TIMESTAMP)   (Last modified time for database) Now we have to check whether user are coming on website for first time or He has already visited. if(isset($_COOKIE['ipaddress'])) { // check is the same ip if($_COOKIE['ipaddress']==$_SERVER['REMO

More than 100 Keyboard Shortcuts must read & Share

Image
More than 100 Keyboard Shortcuts must read & Share Keyboard Shortcuts (Microsoft Windows) 1. CTRL+C (Copy) 2. CTRL+X (Cut) ... 3. CTRL+V (Paste) 4. CTRL+Z (Undo) 5. DELETE (Delete) 6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin) 7. CTRL while dragging an item (Copy the selected item) 8. CTRL+SHIFT while dragging an item (Create a shortcut to the selected item) 9. F2 key (Rename the selected item) 10. CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word) 11. CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word) 12. CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph) 13. CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph) 14. CTRL+SHIFT with any of the arrow keys (Highlight a block of text) SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or sele

Rangoli on Deepavali 2013

Image
   On the Occasion of Diwali, Every Home want there Rangoli to be best from neighborhood, I have click some Picture of my Near My home as well as my home.   You can comment which one is best ....            

A Trip to Banglore

This is My First visit to Banglore, A South Indian City. I have booked a ticket from Nagpur to Banglore with One of My Friend (Prashant). We have done Engineering from one of Government College of Jabalpur. We have not got placement in our college, so we have decided to search job on Banglore. We have reached at evening there. My friend said that our seniors are there, But after reaching there. He said that he lives in Hostel, so we have to search for a stay on Banglore. We are with 3 Bags and no stay options. We also don't know about the city, so we have decided to Book a Cheap Hotels or laudge/ Continue here ...................................................................