According to RFC2616 Section 3.2.1 :
The HTTP protocol does not place any a priori limit on the length of the URI. Servers MUST be able to process the URIs of any resource they serve, and SHOULD be able to process the URIs of unlimited if they provide GET-based forms that can generate such URIs. the server MUST return 414 (Request-URI Too long) if the URI is longer than the server can process (see section 10.4.15).
With this in mind, many browsers do not allow infinite URLs. For example, Internet Explorer has a limit of 2083 characters .
In your case, I would suggest using a session variable to store the error, and delete it after displaying it.
File that creates errors:
<?php $errors = array( 1 => 'Password must have between 6 and 20 characters', 2 => 'User name must contain only AZ, az and 0-9 characters', 3 => 'Captcha code does not match', ); session_start(); $_SESSION['errors'] = $errors; header("Location: http://www.example.com/"); die();
Another page:
<?php session_start(); if ( ! empty($_SESSION['errors']) ) {
Francois deschenes
source share