PHP mysqli code example to search MySQL database

In the following PHP program I have accessed the MySQL database (using PHP’s object oriented mysqli extension ) by a PHP function generated by me, and fetched a “MySQL database table” column value (Departments column) based on some key value in another column ( Serial ). So in a nutshell this program shows how – based on “primary key column value” of a “particular row” of a “single database table”, pick up “another column value” of that row in the same table. Continue reading “PHP mysqli code example to search MySQL database”

Add custom menu, Add theme locations & register new menu

A WordPress developers guide / tutorial – for adding custom menu in new wordpress theme, add one or multiple new theme locations for the custom WordPress menus, so that menu can appear in those places. Register new menu items. Enable your new wordpress theme to add custom user defined nav menus from the admin dashboard. Continue reading “Add custom menu, Add theme locations & register new menu”

WordPress problem in localhost- .htaccess causing internal server error 500

.htaccess in WAMP Server (in WordPress local installation) showing internal server error 500, how to solve it?

The solution is :

  • Left Mouse Click on Wampserver icon in the System Tray in Windows7/XP etc and
  • Goto Apache -> httpd.conf
  • a file will open and in it
  • and search “#LoadModule rewrite_module modules/”.
  • Remove the # as below and save it as follows
  • LoadModule rewrite_module modules/
  • then restart all service.

Actually you need to enable the mod_rewrite module in Apache server. In the httpd.conf file, the configuration file of Apache, find “LoadModule rewrite_module modules/” and remove the pound (#) symbol from the beginning of this line and then save the file and restart WAMP by left mouse click- restart all services.

Also in some cases you need to change AllowOverride none in the httpd.conf to AllowOverride all as well. Read it in wordpress forum

Reference Reading :Some more information on Apache HTACCESS internal server error 500 in Wamp or wordpress installation in wamp server visit this page