Select Option from mysql database

For making select options from mysql database, we make table with name "countries" in mysql database and fill some names as given blow. id country 1 Afg ...

Read More

php mysql_fetch_row

In php mysql_fetch_row() function returns result in a numerical array corresponding to the fetched rows.Offset 0,1 and 2 etc. are used for first column,2nd column and 3rd column etc. respectively.If there are no rows it returns FALSE.As in example w ...

Read More

php mysql fetch array

In php mysql_fetch_array() function returns result in array corresponding to the fetched rows,if there are no rows it returns FALSE.As in example we have table employees in mysql database. id first_name ...

Read More

Php form for inserting records in mysql table

For inserting records with php in mysql table, we need html form, at least one table in mysql. So according to our need, make table with name employees which has three fields id,first_name and lastname as: Create Table employees ( id int NOT NUL ...

Read More

Php is dir function

In php is_dir() function checks whether directory exists or not.Directory's full path is given as an argument. If Directory exists, it returns true otherwise false. Example: <php $path="C:\\Documents and Settings\\user1\\My Document ...

Read More

Php is file function

In php is_file() function checks whether file exists or not.File's full path is given as an argument. If file exists, it returns true otherwise false. Example: <php $path="C:\\Documents and Settings\\user1\\My Documents\\My Pictu ...

Read More

Stripslashes php function

In php stripslashes() function removes the backslashes in the data (\' changes into ' and \\ into \ ). See in the example. <?php $str="This is Raj\'s book."; echo stripslashes($str); // This is Raj's book. ?>

Read More

php date time format

Php date() function returns date format by using timestamp. date(format,timestamp); The timestamp argument is optional. If it is not given by default the value of time() is used. Now see the example of date function for getting mysql ...

Read More

Sql Min function

The MIN function is used to get minimum value in column. Syntax is as: SELECT MIN(column_name) FROM table_name As in example we have table employees id first_name last_name ...

Read More

Sql Max function

The MAX function is used to get maximum value of column. Syntax is as: SELECT MAX(column_name) FROM table_name As in example we have table employees id first_name last_name ...

Read More