SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Echo File in Link

    Basically, I have 2 pages:
    index.php
    image_temp.php

    Image.php has a link that currently looks like this:
    HTML Code:
    <a href="image_temp.php?name=<?php echo htmlspecialchars("Image 1"); ?>">Image 1</a>
    It's sending a page title to 'image_temp.php', which looks like this:
    HTML Code:
    <title>
      <?php
        $name = $_GET['name'];
        echo " {$name}";
      ?>
    </title>
    So, populating the page title works fine.

    My question is, how can I also add a file to the link to populate the body of the second page with a file, 01.jpg, for instance.?

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,508
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    You cannot add a file to the link, you can add a filename to the link. Just like you added name.
    Or, if the file is related to the name, you can change your code in image_temp.php to get the file based on 'name'.

  3. #3
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That sounds like what I'm trying to do.
    I'd want to add something like 'images/01.jpg', then have the image open inside the body of the second page.
    How would I do that?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •