header( 'refresh' ), form data, and IE

From: Date: Tue, 24 Jul 2007 00:18:18 +0000
Subject: header( 'refresh' ), form data, and IE
Groups: php.general 
Request: Send a blank email to php-general+get-259402@lists.php.net to get a copy of this message
Greetings. I have a data entry form that checks for valid input. If something's wrong, it should refresh back to the data entry form, and pass the existing fields back to this form, so the user doesn't have to enter everything again. This is working perfectly in Firefox. It doesn't work at all in Internet Explorer ( 6 ). I can do *simple* refresh operations, such as: header( 'REFRESH: 1; URL=http://www.google.com' ); If I do more complex things, such as append the form data to the URL, it breaks when a field is blank. For example: header( 'REFRESH: 1; URL=http://www.somesite.com/action.php' . '?description=' . $_POST['description'] . '&categoryid=' . $_POST['categoryid'] ); In the above, categoryid is always OK, because it comes from a combo ( select, whatever ), and at the least it has a default value of 0. However if nothing was entered in the 'description' field, I get a URL: http://www.somesite.com/action.php?description=&categoryid=2 Firefox can handle the above perfectly. IE doesn't like the NULL description bit. What's the best way around this? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au

« previous php.general (#259402) next »