insert current date to mysql automatically in yii framework

No Picture

here is example to show how could you insert current date before save in yii ! just use beforSave function in your model, public function beforeSave(){ $mysqldate = date( ‘Y-m-d H:i:s’); $this->addedDate = $mysqldate; return parent::beforeSave(); } addedDate…

Read More »

PHP Insert Data Into MySQL

No Picture

Insert Data Into MySQL Using MySQLi and PDO After a database and a table have been created, we can start adding data in them. Here are some syntax rules to follow: The SQL query must be quoted in…

Read More »

Linux Command-Line Cheat Sheet

No Picture

Moving Around the Filesystem Commands for moving around the filesystem include the following. pwd: The pwd command allows you to know the directory in which you’re located (pwd stands for “print working directory”). For example, pwd in the…

Read More »

Cmd Flush Dns !

No Picture

To flush and reset a client resolver cache using the ipconfig command Open Command Prompt. Type: ipconfig /flushdns Value Description ipconfig The name of the command-line program. /flushdns The command to flush and reset a client resolver cache….

Read More »

Easy MySQL Register/Login system! (Includes every single step!)

No Picture

  Introduction Over the past few years people have been using dini or ffile to create a user register/login system. I find this very idle, slow, and difficult, and i think a lot of ‘new-scripters’ feel the same…

Read More »

How To reset MySQL Auto_Increament?

No Picture

There are times when you are in a testing mode and have inserted and delted too many rows of data in one or too many tables you may want to go to production mode and have finished all…

Read More »

transition background images with css3

No Picture

a refer to previos  post it’s currently not possible to transition background images or css3 gradients! to avoid using especial per image just using n-th-child  method in css3 ! div{ position: relative; width: 400px; height: 200px; } div >…

Read More »

How To Fix Eror Crashed Run Server Samp

No Picture

Hello Frist Open The File Server.cfg And Change Port AnY Port Thank You

Read More »

logo How to rewrite .php to .html at the end of the URLs

No Picture

for one of my websites I finally thought to make it basic html rather than using joomla as it was never been updated so that there were no need for it to a cms for this site but…

Read More »

How to make indivisual custom php.ini on FCGI or CGI Apache handler for PHP

No Picture

cd /home/user/public-html/cgi-bin cp /usr/local/lib/php.ini /home/user/public_html/cgi-bin nano php.ini nano php.fcgi #!/bin/sh export PHP_FCGI_CHILDREN=1 export PHP_FCGI_MAX_REQUESTS=10 exec /usr/local/cpanel/cgi-sys/php5 chmod +x /home/user/public_html/cgi-bin/php.fcgi chown -R user:user /home/user/public_html/cgi-bin/ nano  /home/user/public_html/.htaccess AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php.fcgi then open /usr/local/apache/conf/customconf.conf nano /usr/local/apache/conf/customconf.conf put the…

Read More »