Posts

Check Traffic Sources

Image
Click to large Currently Working on the stuff: if(isset($_GET['token'])) { $token = sanitize($_GET['token']); $sqlcheck = "select `traficsource_source` from `traficsource` where `traficsource_source`='{$token}'"; $result = $dbLink->query($sqlcheck); if($result->num_rows == 0) { $sql1="INSERT INTO `traficsource` (`traficsource_source`, `traficsource_count`, `traficsource_insert`, `traficsource_update`) VALUES ('{$token}', '1', CURRENT_TIMESTAMP, now())"; $result = $dbLink->query($sql1); } else { $sql1="update `traficsource` set `traficsource_count`=(`traficsource_count`+1),`traficsource_update`=now() where `traficsource_source`='{$token}'"; $result = $dbLink->query($sql1); } }

Text Slider

Running Example: PHP is a server side language. JQUERY is a client side language. CSS is used for styling attribute to be called at once. MYSQL is used for storing the database. Here I am describing, how to used Text slider: First we need to define style:   .h1_title  { font-size: 20px;line-height: 22px;font-family: 'Patua One', cursive;font-weight: normal; text-transform: uppercase; letter-spacing: 4px; color:#e7decf;text-align: center; width:50%;padding-top: 25px;display:none; } HTML to be define: <div class="textslider"> <input type="hidden" id="h1countvalue" name="h1countvalue" value="1"/> <h1 class="h1_title" id="h1_title1" style="display:block;">WE OFFER OUR CLIENT EXPERT LEGAL ADVICE<br>ALWAYS PROTECT CLIENTS INTERESTS</h1> <h1 class="h1_title" id="h1_title2">WE OFFER OUR CLIENT EXPERT LEGAL ADV

PHP Variable

Image
Click to Enlarge Here I am Describing Basic of Variable. There are many type of variable used in PHP. Following are some: Variable from GET Method  Variable from POST Method  Variable Used in a PHP program itself Variable from SESSION    Variable from COOKIES Variable Type Description GET Method Variable Variable Used as : Array Using Technique : As Following: By referencing in URL i.e. filname.php?variable1=value1&variable2=value2 By Sending by FORM method will be GET i.e. By HTML Input fields like text, password, select etc. Validity/ Scope: Till they reference in URl or sent by Forms Calling as: Called as $_GET['variable1'] and $_GET['variable2'] POST Method Variable Variable Used as : Array Using Technique : As Following: By Sending by FORM method will be POST i.e. By HTML Input fields like text, password, select etc. Validity/ Scope: Till sent by Forms and the File is running Calling

Basic Website standard must to be maintain in web development

Image
Here we are describing Basic standard to maintain for Proper optimize website Website Standard to Maintain Proper Title of all pages Meta Tag and description correct on all pages Create Sitemap with Priority on XML Don’t include sitemap.xml and robot.txt in search Engine or as Back links  Verified the site on webmasters provided by various search Engine Proper Navigation to site Sitemap on front for user to easily browse the whole website Standard HTMl docs type and CSS Validation

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