background preloader

PHP

Facebook Twitter

Edrackham. How To Add Facebook Like, Twitter Tweet, Google Plus One and Pinterest Pin IT Button in your Index File (Multiple Blog Posts) in Wordpress. It’s very easy and fast how to add the prominent Social Networking Buttons such as Facebook Like Button, Twitter ‘Tweet’ Button, Google ‘Plus One’ and the new addition to the social networking community, the Pinterest ‘Pin it’ button inside every blog post in your WordPress blog.

How To Add Facebook Like, Twitter Tweet, Google Plus One and Pinterest Pin IT Button in your Index File (Multiple Blog Posts) in Wordpress

Simple implementation guides on how to add the buttons are scattered across the world wide web. You just need to copy few codes, tweak some of it and paste it directly wherever you want to display it inside your single.php file. Unfortunately, this method is not appropriate in your Index.php file or in a page with multiple post. If you do this method, you’re button will just return the active url in your web browser. The supposedly task to share the right blog post or url will not be met. With few experimentations, I got to unravel how those buttons work. To start this tutorial, let’s get first the button codes of Facebook Like, Twitter Tweet, Google +1 and Pinterest Pin it: Two out of Four and we’re done! PHP Form Build Class. Validation In PFBC, php validation is achieved in a two step process.

PHP Form Build Class

The first step is to apply validation rules to your form elements via the element's validation property. And secondly, you need to call the Form class' isValid static method once the form's data has been submitted. This function will return true/false. If false is returned, it indicates that one or more errors occurred. <? 50 Extremely Useful PHP Tools. Advertisement By Jacob Gube PHP is one of the most widely used open-source server-side scripting languages that exist today.

50 Extremely Useful PHP Tools

With over 20 million indexed domains using PHP, including major websites like Facebook, Digg and WordPress, there are good reasons why many Web developers prefer it to other server-side scripting languages, such as Python and Ruby. PHP is faster (updated), and it is the most used scripting language in practice; it has detailed documentation, a huge community, numerous ready-to-use scripts and well-supported frameworks; and most importantly, it’s much easier to get started with PHP than with other scripting languages (Python, for example). That’s why it makes perfect sense to provide the huge community of PHP developers with an overview of useful tools and resources that can make their development process easier and more effective. Free but Useful PHP Form Processor Scripts.

Forms are one of the most common features for almost any website.

Free but Useful PHP Form Processor Scripts

It provides a secure communication or feedback from the end user to the sites owner. Having said that, forms often allows security breaches to a website so it is advisable to use secured forms processing systems. 15 very useful PHP code snippets for PHP developers. Following are list of 15 most useful PHP code snippets that a PHP developer will need at any point in his career.

15 very useful PHP code snippets for PHP developers

Few of the snippets are shared from my projects and few are taken from useful php websites from internet. You may also want to comment on any of the code or also you can share your code snippet through comment section if you think it may be useful for others. 1. Send Mail using mail function in PHP 2. 3. The above code will not work in case your client is behind proxy server. 4. This function will return the duration of the given time period in days, hours, minutes and seconds. e.g. secsToStr(1234567) would return “14 days, 6 hours, 56 minutes, 7 seconds” 5. 6. Required Extension: SimpleXML. Uber Gallery. Programming PHP: Chapter 5: Arrays. Using Regular Expressions with PHP. Regular expressions are a powerful tool for examining and modifying text.

Using Regular Expressions with PHP

Regular expressions themselves, with a general pattern notation almost like a mini programming language, allow you to describe and parse text. They enable you to search for patterns within a string, extracting matches flexibly and precisely. However, you should note that because regular expressions are more powerful, they are also slower than the more basic string functions. You should only use regular expressions if you have a particular need. This tutorial gives a brief overview of basic regular expression syntax and then considers the functions that PHP provides for working with regular expressions. PHP supports two different types of regular expressions: POSIX-extended and Perl-Compatible Regular Expressions (PCRE). The Basics In a regular expression, most characters match only themselves. The dot (.) metacharacter matches any single character except newline (\). The metacharacters +, *, ? Back to top <? <? PHP Dynamic Drop-down Box from MySQL Database.

Update 2012-10: The function can be reused for multiple drop-downs on the same page and specify the mask that shows up in the dropdown box for each one.

PHP Dynamic Drop-down Box from MySQL Database

Here is a "quick and dirty" way to get a drop-down box in an HTML page to show the latest values from a MySQL database. Notice that there is a significant lack of error-handling. It sure did help clean up my HTML form, though. Assumptions: You already have a mysql connection object open and a MySQL database selected. [I now have a MySQL Connection Function available]. PHP and Paypal : paypal, php. [GMAIL] - [PHP] - Send email using PHP with Gmail.