Below simple program will export mysql data values to excel sheet without using any PHP libraries. Export to Excel Using PHP and Mysql Note: IF you get errors or in excel all the data is in one column, then instead t tab space use, comma ‘,’.
PHP
Email Verification Confirmation Using PHP Codeigniter
Below is a simple program which shows email verification confirmation using a unique code, implemented in PHP,Mysql, Codeigniter. PHP Codeigniter Email Verification Step 1 :Create a table as shown below with email_verification_code as necessary column: [mysql] CREATE TABLE `users` ( `user_id` int(10) NOT NULL auto_increment, `first_name` varchar(45) NOT NULL, `last_name` varchar(45) NOT NULL, `email_verification_code` varchar(45) […]
Jquery Autocomplete With PHP and Mysql Example
Below is the small example of Jquery autocomplete using PHP and Mysql. search.php
Best way to loop through a PHP mysql Resultset
If you want to loop throuh the mysql result set twice then use below way. $result = mysql_query(“SELECT * FROM my_table”);while($row = mysql_fetch_assoc($result)) {// inside the loop} The problem is, if you want to loop through the same result set again, you will get an error because the internal pointer is currently at the end […]
PHP Radio Button Example With Mysql DB
Simple PHP Radio button enable and disable textarea textbox example in php using Mysql
Search and Retrieve Data from MySQL DB Using PHP
Below is the Simple PHP and MYSQL Search Program. Use below database queries: CREATE TABLE IF NOT EXISTS user (id int(10) NOT NULL AUTO_INCREMENT,Name varchar(20) NOT NULL,PRIMARY KEY (id)); INSERT INTO user (id, Name) VALUES (‘1’, ‘vicky’), (‘2’, ‘vivek’); Below is the sample program:
Using For Loop Looping through Alphabets letters
Using For Loop Looping through letters is possible for($i = ‘S’; $i != ‘AC’; $i++) {echo $i.’ ‘;} Note: $i <= ‘AC’ it only works with $i != ‘AC’ Output : S T U V W X Y Z AA AB
How to Validate Emails Using Filters in PHP
Using PHP Filters we can fully validate an email id and this filter option requires PHP 5 version. Below is the code for validating emails in PHP using filters, along with using explode and foreach loop and then inserting the correct emails in the mysql database. Multiple emails validation. Validate Emails Using Filters in PHP
Simple PHP Program that checks data between two dates using jquery and returns result
Below is the PHP script for returning the result using from and two dates with jquery, using mysql as db. It pulls all the data present in between teh mentioned from and to dates. The jquery UI user datepicker it has functionalities like default date and onload show current date. From to
How to ini_set in PHP
You can initilize local settings in a php file.You can set values like max_execution_time, default_socket_timeout, memory_limit, mysql.connect_timeout, user_ini.cache_ttl, display_errors and log_errorsit always nice to check the errors in PHP files with error_reporting. Below is the sample script to set ini_set values. If you dont want to set every time in PHP script simply set the […]