Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Open new window URL, variable from form in URL PHP

  1. #11
    Join Date
    Dec 2008
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    *QUOTE*
    So if I searched for "Through the fire and the flames", it would add whatever button I checked to the end? Like "Through the fire and the flames.mp3"
    *END QUOTE*

    It would only add the name to the URL:
    http://www.google.com/search?hl=en&q...+%2B(.mp3)+%22Through the fire and the flames%22

    the .MP3 is hard coded in the URL already

    so if the user chooses .WMA it would be:
    http://www.google.com/search?hl=en&q...+%2B(.wma)+%22Through the fire and the flames%22


    thank you,
    Michael
    Last edited by squaredvision; 03-03-2009 at 08:46 PM.

  2. #12
    Join Date
    Dec 2008
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Maybe this can be done with If statements, If user select mp3, put whatever is in search box in the mp3 URL, when user selects wma, put whatever is in search box in the wma URL.

    hmm, i'm still trying to figure this out.

  3. #13
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Try and figure it out for yourself and you'll probably learn quicker.

    Here's something to get you started:

    PHP Code:
    <?php

    if (isset($_GET['extension']))
    {

    switch (
    $_GET['extension'])
    {
    case 
    "mp3":
    $ext "mp3";
    // Add your url code and add the .mp3 where necessary
    break;

    case 
    "wma":
    $ext "wma";
    // Add your url code and add the .wma where necessary
    break;

    // Etc...

    // echo "http://www.google.com?q=" . $search . $ext;


    }

    }

    ?>
    Sorry about the bad formatting but it's a bit hard to do indents on here.

    Hopefully you can figure it out from here,

    Good luck!

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
  •