jQuery ,MYSQL and PHP to create : Facebook like photo gallery with comments

Databases, PHP, PHP Scripts, Tutorials
Have you considered own facebook-style photograph gallry framework with remarks? I suppose – yes. Today I made up my psyche to plan it for you. Fundamental thought – when we click at pictures – they popup (ajax) with greater picture at the left and remarks area at the right. All pictures are in the database (mysql). Furthermore, obviously, we will utilize Php to realize our effect. Additionally, our remark framework will anticipate tolerating more than 1 remark for every 10 mins (to dodge spam). Step 1. SQL For our gallery I prepared two SQL tables: first table keeps records of our images. It contains several fields: title, filename, description, time of adding and comments count. Another table keeps comments. So, execute next SQL instructions: 01 CREATE TABLE IF NOT EXISTS…
Read More

jQuery to create : Facebook Style Pagination

Ajax, PHP, PHP Scripts
As your site develops, it is no more drawn out down to earth to showcase all the information without a moment's delay on the same page. Also, the closure client will most likely be intrigued with just part of the substance. Likewise, stacking all the substance as soon as possible may build the server burden or basically a waste of transmission capacity. This is where pagination comes into play.first, I am not too beyond any doubt how you might as well call this thing that you are set to look into yet its objective is comparable to an ordinary pagination, That is, to presentation fractional substance and to spare data transfer capacity! This article is about how to make a comparable stuff to twitter and Facebook's route of showing information.…
Read More

PHP and jQuery to create : facebook post to wall system

Ajax, PHP, PHP Scripts, Tutorials
Assuming that you have not perused our past post on making a Facebook post to divider framework then you might as well read it first. In this article, we will demonstrate how I included code antiquated bind" for the purpose that when clicked, it will post the substance of the content range as divider post. HOW IT WORKS ? When you click on “share” button : The file insert.php is called via ajax to save message in database, if message is saved successfully , then add message to the unordered list like below: <ul id="posts"> <li>My wall post message </li> </ul> Jquery code below is used to add the message as list : $('ul#posts').prepend('My wall post message'); The textarea message is then cleared $('textarea#wall').val(''); If another message is shared on the…
Read More

PHP Cookies

PHP, PHP Scripts
Cookies are principally used to validate a clients session, they are modest parcels of information that are archived in the web browser that permit a site to match particular client qualified data to that in the database, therefore confirming the client. So what are the values? setcookie($name, $value, $expire, $path, $domain, $secure); $name – is what you want to call the cookie, we will use this to reference the cookie later $value – value of the cookie. For example "yourname". $expire – is the time in UNIX timestamp format when the cookie will expire for example, time()+”3600″. The cookie would then expire after an hour. $path – The path on the server where the cookie will be available. For example, if the path is set to “/”, the cookie will…
Read More

Php customary representation Twitter connections

PHP, PHP Scripts
Here's a snappy bit of code to highlight answers to clients in twitter for instance @vivacityIT this script utilization general outflow to find and trade a dependent upon two items. Firstly it checks for a space preceding the @ image and after that checks for the space at the close of the clients name, it then takes that string and swaps it with a connection to the client twitter profile. Convenient in the event that you have a dynamic record of tweets that you need to linkify. All you have to do is change $ret to the variable the holds your string. $ret = preg_replace("#(^|[n ])@([^ "tnr<]*)#ise", "'\1<a href="http://www.twitter.com/\2" >@\2</a>'", $ret); These two lines of code make a comparable showing with respects the structure anyway they search for the http://…
Read More

Remake Your Business Strategies Through Affordable Web Development

PHP, Software Development, Web Development Services
In today's post-nature, sites have picked up enormous vitality inside conglomerations that need to make a worldwide effect through items that they accept are one of a kind and full of reason. The present overpowering requests for reasonable web growth further creates the way that business systems can no more get by without innovation, or would it be advisable for me to say that they are conjoined, rather coincide. Although content and ease of use are critical to an online stage, it is a stable execution prepare coupled with secure and optimal exhibition that might convey the sought objectives. In the wake of having picked up huge experience in the circle of online business, Indian web growth bureaus have turned into the pioneers in this field of function. What's more…
Read More

jquery Php and Mysql Username Availability Checker

Ajax, PHP, Tutorials
I was perusing Nettuts.com without much fanfare and saw the post by Matt Vickers on checking the accessibility of a username with Mootools. I tend not to utilize Mootools so i supposed I'd reproduce the system utilizing jquery. The code debases dexterously if Javascript is handicapped, it is exhorted that you dependably check the username against the database once more, simply before you add any information to the database. The Javascript So to begin with we have our jquery on report primed capacity, inside this we have an occasion audience .keyup capacity which when triggered runs the capacity 'username_check'. Inside the "username_check" capacity we firstly appoint the variable "username" to the worth of the data field with the id #username. We now run a couple of watches that the username…
Read More

Identifying an Ajax Request with Php

Ajax, PHP
Here's a fast bit of code that i find handy to check if a solicit that goes to a Php page was made through an Ajax call or a basic structure post. This system utilization the $_server['http_x_requested_with'] ask for to confirm if information was sent to a particular page utilizing a xmlhttprequest. It's worth acknowledging that there is no certification that each web server will furnish this setting, servers might discard particular $_server parameters, That said, an imposing number of these variables are accounted. if(isset($_server['http_x_requested_with']) && !empty($_server['http_x_requested_with']) && strtolower($_server['http_x_requested_with']) == 'xmlhttprequest') { // If its an ajax solicitation execute the code beneath reverberation 'this is an ajax request!'; retreat; } //provided that its not an ajax appeal resound the beneath. reverberation 'this is obviously not an ajax request!'; The code…
Read More

HTTP Authentication in PHP

PHP, Techniques, Tips, Tutorials
Sometimes you might wish to make certain pages of your site just perceptible to a chosen few. you can do this by utilizing Phps constructed within Http Authentication. The code ought to go right at the highest point of your php page so don't get 'headers Already Sent' mistakes. You can see that we've specified the username and secret word in the variables at the highest point of the script you can change these to reflect your own particular username and watchword. You could effortlessly make this verification more dynamic by checking a database for the username and watchword. We can get whatever the client sorted into the dropdown box by tagging the accompanying superglobals. //Username: <?php echo $_SERVER['PHP_AUTH_USER'];?> //Password: <?php echo $_SERVER['PHP_AUTH_PW'];?> The Code <?php $config['admin_username'] = "demo"; $config['admin_password']…
Read More

Easy PHP Pagination

PHP, PHP Scripts, Tutorials
We had a couple of pagination scripts through the years yet I supposed i'd impart the particular case that i'm presently utilizing as its an of service script to have in your tool stash. As a designer you'll soon discover a requirement to paginate information when showing substance from the database, and instead of utilization Javascript which could require all the information to be stacked into the page on burden, we can utilize Php to guarantee that we're just asking for the information that we need from the database. For those who have no idea what i'm discussing. Pagination is a path of part up information into reasonable pieces to presentation to a client, assuming that you've used more than two minutes on the web chances are you've come into…
Read More