SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    michigan
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation echo ahref help! please

    I have this code below but would like to make <ahref>$value</a>

    if ($_POST['check']) {
    $check = $_POST['check'];
    //$check_num = num($check);
    foreach ($check as $value) {
    echo $value . "";
    }
    echo "<hr>";
    }


    for example, I have
    <input type="checkbox" name="check[]" value="file.csv" /> sample1
    <input type="checkbox" name="check[]" value="file2.csv" /> sample2
    then I want it to do this
    echo "download now. " <ahref=load.php?file=/download/$value</a>";
    I dont know the format for linking at all. How do I do this?

  2. #2
    Awesome Addict
    Join Date
    Mar 2004
    Location
    Toronto, Canada
    Posts
    326
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nubian
    I have this code below but would like to make <ahref>$value</a>

    if ($_POST['check']) {
    $check = $_POST['check'];
    //$check_num = num($check);
    foreach ($check as $value) {
    echo $value . "";
    }
    echo "<hr>";
    }


    for example, I have
    <input type="checkbox" name="check[]" value="file.csv" /> sample1
    <input type="checkbox" name="check[]" value="file2.csv" /> sample2
    then I want it to do this
    echo "download now. " <ahref=load.php?file=/download/$value</a>";
    I dont know the format for linking at all. How do I do this?

    PHP Code:
    <?

    echo "<a href=\"load.php?file=/download/" $value "\">Download Now!</a>";

    ?>

  3. #3
    Dinah-Moe Humm mudshark's Avatar
    Join Date
    Dec 2003
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if ($_POST['check']) {
        
    $check $_POST['check'];
         foreach (
    $check as $value) {
             print 
    "<a href=\"load.php?file=/download/" $value "\">download now</a>";
         print 
    "<hr />";
         }
     } 

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    michigan
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks

    thanks a lot. That works


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
  •