Jump to content

Recommended Posts

Ive got a html site with 5 columns The columns have 5 links  and I would like to use php to fill them. Years ago I could convert index.html to php just changing index.html to php.. For some reason not now.+ It would save hours of time consuming work.

 

<div class="col-xl-2">  
      Adams County  <BR />    
     <a href="  https://adamssheriff.org/ "> Sheriff</a>  <br />    
    <a href="https://www.coloradojudicial.gov/courts/trial-courts/Adams-county "> Judicial</a><br />    
    <a href=" https://adcogov.org/ ">Government</a> <br />        
    <a href=" https://www.brightonco.gov/ ">Brighton</a> <br />
    <a href=" https://www.brightonco.gov/203/City-Council ">Council</a> <br />        
    <a href="  https://en.wikipedia.org/wiki/Adams_County,_Colorado"> Wiki</a><br />

 

Link to comment
https://forums.phpfreaks.com/topic/328361-php-website/
Share on other sites

  • cabbie changed the title to php website

Yes, you can rename index.html to index.php and it will work fine, with the following caveats:

  • If your webserver is not set to treat index.php as the DirectoryIndex, then it won't serve index.php if it isn't specifically referenced.  
  • It does not automagically make html into PHP.  You need to have PHP blocks or add PHP alternative syntax within your html markup.

You've provided 6 static links here, and no explanation of what PHP is going to be doing for you.

I'd also highly recommend you improve your markup, rather than using a bunch of wonky br's organize your internal structure, and use bootstrap's utility classes as well:

<div class="col-xl-2">
    <div class="fw-bolder fs-3">
      Adams County
    </div>
 
    <ul class="list-group">
      <li class="list-group-item"><a href="https://adamssheriff.org/ "> Sheriff</a></li>  
        <li class="list-group-item"><a href="https://www.coloradojudicial.gov/courts/trial-courts/Adams-county ">Judicial</a></li> 
        <li class="list-group-item"><a href="https://adcogov.org/">Government</a></li>        
        <li class="list-group-item"><a href="https://www.brightonco.gov/">Brighton</a></li>
        <li class="list-group-item"><a href="https://www.brightonco.gov/203/City-Council">Council</a></li>        
        <li class="list-group-item"><a href="https://en.wikipedia.org/wiki/Adams_County,_Colorado">Wiki</a></li>
    </ul>
</div>
  

 

If you have a more specific question, add a follow up.

Link to comment
https://forums.phpfreaks.com/topic/328361-php-website/#findComment-1654647
Share on other sites

Thanks I am working on responsive maps right now CO counties (64 with 6 links). A project like this takes a lot of time and one looks for shortcuts and easier ways. I'll provide a link below and you go to the nav dropdown maps and see a few i have done. Also you can watch the videos to see why I'm doing this..   I also produce videos (I made these videos)

https://cosmaps.org/index.html

Edited by cabbie
Link to comment
https://forums.phpfreaks.com/topic/328361-php-website/#findComment-1654666
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.