Well, you wouldn't want a space between the URL and the query string, but also note that if $url contains http://someserver.co.uk then you won't have a valid path - you need a forward slash before the query string.

Also note that you should probably use [man]rawurlencode/man on variables where you don't control the source (e.g. the two name variables) just to be sure they don't break the URI.

    or can the data be posted to the loacation in some way like a form sending

      djwideboy wrote:

      hi could you possily show me an example?

      Well that would depend on where $url is coming from and what it contains...

      header("Location: $url/?name=" . rawurlencode($name) . '&lastname=' . rawurlencode($lastname));
      djwideboy wrote:

      or can the data be posted to the loacation in some way like a form sending

      If the script you're redirecting to is on your website, I would suggest using a [man]session[/man] instead of POST'ing the data. Otherwise, if the page is on a remote site, you can't POST data as well as redirect the user. Instead, you could POST data via the [man]cURL[/man] extension, retrieve the response, and output it to the user.

        Write a Reply...