Doubt to create an php coding

Hello friends

             I need to create a button in my webpage while the user click the button ,my webpage should fixed as users browsers  home page how can we do it please help me by giving solutions ...

There is some other way, though it may not be practical.

You could refuse to support other web browsers and tell them to come back with Internet Explorer. That way you can then set their home page when they return with their Internet Explorer web browser.

Other than that though, there really is no other way, at least with javascript.

It can’t be done, IE is the broken one here: you shouldn’t be able to change the settings of the user’s PC from a web page, that’s terrible software design.

Internet Explorer is about the only web browser that allows the web page to set your home page. For other web browsers you may just have to rely on instructing the visitor to manually set your web site as their home page.

no other way brother their will be some way right …dont disappoint me…

You can’t do that using PHP. You need javascript for that.
Use your favorite search engine for “javascript bookmark function”, you’ll find loads of scripts :slight_smile:

hello friends this only works for internet explorer not working for google chrome or firefox…me too finded the same code when i googled but the issue is its only working for internet explorer

If all browsers allowed this with a simple javascript function, would you be very happy if every time you went to a webpage it set your homepage to it? How about if every page did that? How long would you be happy with your homepage being reset every 5-8 seconds?

IE -is- the broken one here.


<input type="button" value="Make This Site Your Home Page" onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('Page URL beginning with http:// here');" />