Home » php
Showing posts with label php. Show all posts
Showing posts with label php. Show all posts
09 February 2017
08 February 2017
07 February 2017
PHP $$variable Double dollar sign Meaning
(If you found this article useful then share with your friends.)
06 February 2017
04 February 2017
03 February 2017
Write PHP code inside HTML file

For Example:
To print something inside php, we can use the fuction named echo which is predefined in php for printing.
For Example:
To use php variable value inside html tag: We have taken a variable with name 'year' and value is set as '2014'. And the value of the variable has been used inside input text box inside the 'value' attribute .
You have to be very careful when using php inside html. With little mistake, you may not get result.
Note: Make sure the file extension ends with .php , as php is scripting language, so it needs a server to execute the php code.
Learn: How to write HTML inside php
(If you found this article useful then share with your friends.)
02 February 2017
Short Note on Types of Array in PHP
(If you found this article useful then share with your friends.)
01 February 2017
How to Replace space with Dash in PHP
(If you found this article useful then share with your friends.)
14 December 2013
php File Upload - Tutorial with Example
![]() |
PHP: Hypertext Preprocessor,scripting language |
PHP File Upload
Example HTML code for file upload:
Form_page.php
upload_file.php [Simple Code]
Parameters of $_FILES
- $_FILES["file"]["name"] - the name of the uploaded file
- $_FILES["file"]["type"] - the type of the uploaded file
- $_FILES["file"]["size"] - the size in bytes of the uploaded file
- $_FILES["file"]["tmp_name"] - the name of the temporary copy of the file stored on the server
- $_FILES["file"]["error"] - the error code resulting from the file upload
upload_file.php [Code with Restriction on Upload, store the file in php temp folder]
upload_file.php [Code with Restriction on Upload, store the file in destination folder]
(If you found this article useful then share with your friends.)
11 December 2013
How to decode JSON using PHP5 for Facebook application

Code Sample : //FETCHING THE JSON FROM THE URL
// THIS PRINTS THE WHOLE STRING OF JSON
// ITS SAME AS YOU ARE USING it as an object
//PRINTS THE FIRST NAME OF THE LOGGED IN USER
You can also directly use the graph api for showing the profile picture. For example :
Link :
Graph API Facebook Documentation(If you found this article useful then share with your friends.)
26 May 2012
How to stop this from showing in php5 ? :: Warning: Cannot modify header information - headers already sent by (output started at ::
PHP5 Problem:
"Warning: Cannot modify header information - headers already sent by (output started at "

This warning message can be corrected by deleting the empty spaces and lines
before and after the < ? php and ? > tags .
for example :
Error Format :

Corrected Format:
"Warning: Cannot modify header information - headers already sent by (output started at "

This warning message can be corrected by deleting the empty spaces and lines
before and after the < ? php and ? > tags .
for example :
Error Format :

Corrected Format:

(If you found this article useful then share with your friends.)
17 November 2011
PHP MySQL data not showing from result after query
Nice and helpful post.
Output: Resource id #3
Solution: use mysql_fetch_row( $result ) in a while loop to get all result in an array..
Output: Resource id #3
Solution: use mysql_fetch_row( $result ) in a while loop to get all result in an array..
(If you found this article useful then share with your friends.)
23 December 2010
How to use PHP bot to get Wikipedia definitions
This code helps to parse wikipedia definitions on given keyword.
Here is a code given that parse webpage using php with Curl extension.
A function is given which takes the keyword as input and outputs the array which holds the data.
$url : Holds the link to be parsed.
File name : wiki_parse.php
Thanks to barattalo.it
Here is a code given that parse webpage using php with Curl extension.
A function is given which takes the keyword as input and outputs the array which holds the data.
$url : Holds the link to be parsed.
File name : wiki_parse.php
Thanks to barattalo.it
(If you found this article useful then share with your friends.)
24 October 2010
Some useful PHP MYSQL functions
PHP MYSQL functions helps to connect to the database in MySQL software.
These are some of the most frequently used function names :
mysql_connect — Open a connection to a MySQL Server
mysql_create_db — Create a MySQL database
mysql_error — Returns the text of the error message from previous MySQL operation
mysql_fetch_array — Fetch a result row as an associative array, a numeric array, or both
mysql_num_rows — Get number of rows in result
mysql_query — Send a MySQL query
mysql_tablename — Get table name of field
mysql_close — Close MySQL connection
These are some of the most frequently used function names :
mysql_connect — Open a connection to a MySQL Server
mysql_create_db — Create a MySQL database
mysql_error — Returns the text of the error message from previous MySQL operation
mysql_fetch_array — Fetch a result row as an associative array, a numeric array, or both
mysql_num_rows — Get number of rows in result
mysql_query — Send a MySQL query
mysql_tablename — Get table name of field
mysql_close — Close MySQL connection
(If you found this article useful then share with your friends.)
Subscribe to:
Posts (Atom)