Skip to content

Lab 15: PHP code in plain HTML file #32

@Diftraku

Description

@Diftraku

In the index.html there is PHP code that will not run if you have a properly configured web server. Either rename the file to index.php or replicate the functionality in javascript:

    <?php
    if(!empty($instagram_array)){
      foreach($instagram_array['data'] as $key=>$image){
        echo '<img src="'.$image['images']['low_resolution']['url'].'" alt=""/><br/>';
      }
    }
    ?>

In general, mixing PHP and HTML should be avoided, instead using templates or javascript for the dynamic content.

Also in the same file, the form target should be bin/geogram.php.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions