114 users online (1 members and 113 guests)  

  Results 1 to 2 of 2


  1. Advanced redirecting in Javascript    Forum: Javascript Forum
    Replies: 2
  2. redirecting?    Forum: General Discussion
    Replies: 3
  3. Redirecting    Forum: Website Scripts Forum
    Replies: 3
  1. #1
    edison's Avatar
    New User

    Join Date
    Aug 2007

    Redirecting to URL

    I am desparately in need of some help here.
    First of all CGI/Perl are greek to me. I am only familiar with PHP.
    I have this Form with a File Field. Passing to a CGI file(upload.cgi?id=20) to process for File upload. I have to use CGI/Perl as it is uploading large file size.
    The "id" variable in the URL is dynamic and will changes according to member who upload it.
    I did not write the CGI file myself but found it from the internet which is Free for non-commercial usage.
    Inside the "upload.cgi" file there is a variable set to redirect the file upon upload success.
    $redirect = "http://www.baltech.com.my/index.php";
    Somewhere further below the file there is a script to trigger the redirection :
    # redirect user
    print qq~Location: $redirect\n\n~;
    My question is, how can I set the $redirect url to redirect to for instant...
    The "id" variable should be the one passed to the cgi file.

    Hope to find a solution here.

  2. #2
    xmassey's Avatar
    Senior Member

    Join Date
    Apr 2007

    Re: Redirecting to URL

    I have probably understood you wrong, why don't you just change $redirect to
    $redirect =http://www.baltech.com.my/index.php?id=20;
    if you want to just change the id then you could have this:
    $path = "http://www.baltech.com.my/index.php";
    $id = "?id=20";
    $redirect = "$path$id";
    and you can change the id accordingly if needed. Etc etc

Tags for this Thread