Wednesday, February 15, 2017

Duplicate entry '1' for key 'PRIMARY'

My application is working fine in localhost but when i was export my sql file online server suddenly it is showing

Duplicate entry '1' for key 'PRIMARY'

I drop the table and again import server times but no solution though i'm sure i have a primary column with auto increment option.

So later when exporting the sql file from phpmyadmin i click "custom", scoll down and click Add DROP TABLE / TRIGGER statement. then import the sql file again and this  time it worked for me.



Thursday, January 26, 2017

Creating multiple name server

If we want to create name server under www.esteemcorporation.com to different server but esteem it self hosted another server.


Example i need to use


This 2 name server for a server IP 00.11.22.33.44


Ns1.esteemcorporation.com
Ns2.esteemcorporation.com


This 2 for 55.66.77.88.99
Ns5.esteemcorporation.com
Ns6.esteemcorporation.com


But esteemcorporation.com is hosted another server.


Now create child name server from esteemcorporation.com domain panel and assign IP



Now go to WHM/Cpanel of esteemcorporation.com and find DNS zone edit option. Add A record to ns5.esteemcorporation.com and assign IP.


Now we can use NS5.esteemcorporation.com   as a nameserver which pointed to 55.66.77.88 server.

Wednesday, December 28, 2016

Print header and footer on every printed page of a document HTML CSS

If you take the element that you want to be the footer and set it to be position:fixed and bottom:0, when the page prints it will repeat that element at the bottom of each printed page. The same would work for a header element, just set top:0 instead.


For example:
<div class="divFooter">Printed By Sharif</div>
CSS:
@media screen {
  div.divFooter {
    display: none;
  }
}
@media print {
  div.divFooter {
    position: fixed;
    bottom: 0;
  }
}

Total Pageviews