Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Top PHP Online Resources

Top PHP Online Resources 5 Top excellent PHP online resource  http://www.php.net/ This is perhaps the most useful of the sites listed  in this appendix, simply because this is the site that contains up-to-date versions of not only the  official documentation, but also the latest releases  of PHP, including the PHP source and PHP binaries.  If that is not enough, this site also contains an up-to-date  listing of...

PHPINFO-Displaying information about the PHP environment

PHPINFO-Displaying information PHPINFO-about the PHP environment Functions that are built into PHP can be called from any PHP script. When you call functions, you are executing the code inside them, except the code  is reusable and more maintainable. Phpinfo- It returns configuration and technical information  about your PHP installation. The function helps you  diagnose common problems and issues. You may find that this is one...

How to Sending Data to a Database php

How to Sending Data to a Database php Save Data to a Database by php The process of adding information to a table is similar  to creating the table itself in terms of which functions  you use, but the SQL query will be different. $Query = "INSERT into $TableName values  ('value1', 'value2', 'value3', etc.)"; mysql_db_query ("DatabaseName", $Query,  $Link); The query begins with INSERT into $TableName values. Then,...

PHP method of securely Tips

PHP method of securely website PHP Web security tips Passwords used within your PHP application  should always be encrypted. If the server you are using does not support mcrypt(), use crypt() to encrypt the password entered during the login, then check this against the stored encrypted password. Cryptography is just a part of a secure solution as it can  only be used once data has been received by the server.  You may also...

PHP File Upload Script

PHP File Uploading Code Take a moment to commit the following list to memory— it contains the variables that are automatically placed in the  $_FILES superglobal after a successful file upload.  The base of img1 comes from the name of the input  field in the original form. $_FILES[$img1] [tmp_name]. The value refers to the temporary file on the Web server. $_FILES[img1] [name]. The value is the actual name of the file that...

Creating a Php Script to Mail Your Form

Php Mail Script According to the form action in simple_form.html, you  need a script called send_simpleform.php. The goal  of this script is to accept the text in  $_POST[sender_name], $_POST[sender_email], and $_POST[message] format, send an e-mail, and  display a confirmation to the Web browser. Open a new file in your text editor. Begin a PHP block, then start building a message string: PHP script to process the form,...

php Sessions code

Php Sessions Sessions are used to help maintain the values of variables across multiple web pages. This is done by creating a unique  session ID that is sent to the client browser. The browser  then sends the unique ID back on each page request and  PHP uses the ID to fetch the values of all the variables associated with this session. The session ID is sent back and forth in a cookie or in the URL. By default, PHP tries to...

All Operators Of PHP

  All PHP Operators  An expression is the basic building block of the language. Anything with a value can be thought of as an expression. Examples include: 5 5+5 $a $a==5 sqrt(9) By combining many of these basic expressions, you can build larger, more complex expressions. Note that the echo statement we've used in numerous examples cannot be part of a complex expression because it does not have a return value. The print statement,...

Variables in PHP

Variables in PHP Variables are used for storing a values, like text strings, numbers or arrays. When a variable is set it can be used over and over again in your script All variables in PHP start with a $ sign symbol. The correct way of setting a variable in PHP: <?php $txp = "test"; $no = 18; ?> PHP here are  three different variable scopes:    local    global    static Variable Naming...

PHP Array Introduction

Function Description PHP  Testing Array and sizeof( )<?php$fixture = Array( );// $fixture is expected to be empty.$fixture[] = "element";// $fixture is expected to contain one element.?>A really simple way to check whether we are getting the results we expect is to print the result of sizeof( ) before and after adding the element array() Creates an array  array_change_key_case() Returns an array with all keys in lowercase...

XML in PHP-SimpleXML-DOM-XMLReader

There are many ways we can work with XML in PHP, and they’re all useful in different situations. There are three main approaches to choose from and they all have their advantages and disadvantages: 1. SimpleXMLis the most approachable, and my personal favorite. It is easy to use and understand, is well documented, and provides a simple interface (as the name suggests) for getting the job done. SimpleXML does have some limitations, but it is recommended...

Working with Cookies in PHP

Cookies are key/value pairs, that are sent to the browser along with some other information, such as which paths the cookie is valid for and when it expires. Since PHP is designed to solve “the Web problem,” it has some great features for working with cookies. To set a cookie, use a function helpfully called setcookie(): <?php setcookie("visited", true); We can use this approach to show a welcome message to a visitor when he first comes to...

Free php classified script

PHP Classified Script | The best classifieds software.Plug and Play. Our theme is plug and play and you dont need any extra plugins or other scripts to run your classified ads website. Also the installation process is .http://phpclassifiedscript.com Classified Script | Best PHP Classified Script PHP Classified Script. Easy-to-use SEO friendly classifieds script which allow you to create own classified ads web site in a few clicks. Make money from...

Top PHP Tutorial website

PHP - Wikipedia, the free encyclopedia PHP is a server-side scripting language designed for  web development but also used as a general-purpose programming language. As of January 2013, PHP was installed on ... http://en.wikipedia.org/wiki/PHP PHP 5 Tutorial - W3Schools Online Web Tutorials PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.  PHP is a widely-used, free, and efficient...

PHP Sessions - setcookie

mplement a session timeout of your own.  Both options mentioned by others session.gc_maxlifetime  and session.cookie_lifetime are not reliable. session.gc_maxlifetime session.gc_maxlifetime specifies the number of seconds after which data will be seen as  'garbage' and cleaned up. Garbage collection  occurs during session start. But the garbage collector is only started with a probability of session.gc_probability divided  by session.gc_divisor. And using the default values for those options 1 and 100 respectively,...