Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lab 15: PHP code in plain HTML file #32

Open
Diftraku opened this issue Apr 18, 2016 · 0 comments
Open

Lab 15: PHP code in plain HTML file #32

Diftraku opened this issue Apr 18, 2016 · 0 comments

Comments

@Diftraku
Copy link

Diftraku commented Apr 18, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant