mraza Posted October 20, 2009 Share Posted October 20, 2009 Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. : if (isset($_POST['sub1'])) { $id = $_POST['cscstest']; $qty = $_POST['cscsqty']; $id = $_POST['cscstestmul']; $qty = $_POST['multiqty']; $id2 = $_POST['extralan']; $qty2 = $_POST['languagetestqty']; If (!empty($_POST['cscstest'])) { $id = $_POST['cscstest']; $qty = $_POST['cscsqty']; $_SESSION['cscstest'] = $id; $_SESSION['cscsqty'] = $qty; $_SESSION['cscsqty'] = isset($_POST['cscsqty']) && $_POST['cscsqty'] > 0 && is_numeric($_POST['cscsqty']) ? $_POST['cscsqty'] : 1; $add_item = add_to_cart_multiple($id, $_SESSION['cscsqty']); $_SESSION['total_items'] = total_items($_SESSION['cart']); $_SESSION['total_price'] = total_price($_SESSION['cart']); } if (!empty($_POST['cscstestmul'])) { $id = $_POST['cscstestmul']; $qty = $_POST['multiqty']; $_SESSION['cscstestmul'] = $id; $_SESSION['multiqty'] = $qty; $_SESSION['multiqty'] = isset($_POST['multiqty']) && $_POST['multiqty'] > 0 && is_numeric($_POST['multiqty']) ? $_POST['multiqty'] : 1; $add_item = add_to_cart_multiple($id, $_SESSION['multiqty']); $_SESSION['total_items'] = total_items($_SESSION['cart']); $_SESSION['total_price'] = total_price($_SESSION['cart']); } if (!empty($_POST['extralan'])) { $id2 = $_POST['extralan']; $qty2 = $_POST['languagetestqty']; $_SESSION['extralan'] = $id2; $_SESSION['languagetestqty'] = $qty2; $_SESSION['languagetestqty'] = isset($_POST['languagetestqty']) && $_POST['languagetestqty'] > 0 && is_numeric($_POST['languagetestqty']) ? $_POST['languagetestqty'] : 1; $add_item2 = add_to_cart_multiple($id2, $_SESSION['languagetestqty']); $_SESSION['total_items'] = total_items($_SESSION['cart']); $_SESSION['total_price'] = total_price($_SESSION['cart']); } if (!empty($_POST['otherqty'])) { $id3 = $_POST['otherqty']; $qty3 = $_POST['otherqtynum']; $_SESSION['otherqty'] = $id3; $_SESSION['otherqtynum'] = $qty3; $_SESSION['otherqtynum'] = isset($_POST['otherqtynum']) && $_POST['otherqtynum'] > 0 && is_numeric($_POST['otherqtynum']) ? $_POST['otherqtynum'] : 0; $add_item3 = add_to_cart_multiple($id3, $_SESSION['otherqtynum']); $_SESSION['total_items'] = total_items($_SESSION['cart']); $_SESSION['total_price'] = total_price($_SESSION['cart']); } header('Location: index.php'); } ANY HELP Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/ Share on other sites More sharing options...
Bricktop Posted October 20, 2009 Share Posted October 20, 2009 Hi mraza, Try adding die(); below the header statement, i.e.: header('Location: index.php'); die(); Hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940494 Share on other sites More sharing options...
PFMaBiSmAd Posted October 20, 2009 Share Posted October 20, 2009 Your code is dependent on $_POST['sub1'] being set. Have you checked if it is? Perhaps the HTML of your form is invalid and the other browser are ignoring the error while IE does not. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940496 Share on other sites More sharing options...
zq29 Posted October 20, 2009 Share Posted October 20, 2009 Your code is dependent on $_POST['sub1'] being set. Have you checked if it is? Perhaps the HTML of your form is invalid and the other browser are ignoring the error while IE does not. Also, if $_POST['sub1'] is referring to an image button, you need to check for $_POST['sub1_x'] or $_POST['sub1_y'], as that's what IE sends instead. Other browsers also send these. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940503 Share on other sites More sharing options...
Dorky Posted October 20, 2009 Share Posted October 20, 2009 short urls in header are problematic http://php.net/manual/en/function.header.php http://support.microsoft.com/smarterror/default.aspx?spid=global&query=kb%20234067&errurl=%2fdefault.aspx%2fkb%2f234067%255D and exit; would work better. die is so harsh lol. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940504 Share on other sites More sharing options...
mrMarcus Posted October 20, 2009 Share Posted October 20, 2009 and exit; would work better. die is so harsh lol. they are identical .. don't say it works better. and i've never had problems with short urls in header() .. makes no difference so long as the path is correct. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940511 Share on other sites More sharing options...
redarrow Posted October 20, 2009 Share Posted October 20, 2009 die() is more power full then exit() Another very important construct is die(), which is itself an alias of exit(). It allows you to terminate the script’s output and either output a string or return a numeric status to the process that called the script. http://www.phpfreaks.com/forums/index.php?topic=245089.0 Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940519 Share on other sites More sharing options...
Dorky Posted October 20, 2009 Share Posted October 20, 2009 and exit; would work better. die is so harsh lol. they are identical .. don't say it works better. and i've never had problems with short urls in header() .. makes no difference so long as the path is correct. die doesn't prevent destructors from being run, so the script doesn't exit immediately, it still goes through cleanup routines. http://php.net/manual/en/function.die.php Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940520 Share on other sites More sharing options...
mrMarcus Posted October 20, 2009 Share Posted October 20, 2009 This (die) language construct is equivalent to exit(). and vice-versa. it becomes a preference (like print vs echo) .. i use exit() instead of die when closing scripts, because that's what i started using waaaay back when. header() will redirect upon initiation, while not executing anymore code thereafter .. as a precaution, however, placing exit() die() immediately following the header() will ensure that no code is run further. this can argued 'til the sun comes up, however, this does not solve the problem at hand. ball is in OP's court. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940555 Share on other sites More sharing options...
mraza Posted October 20, 2009 Author Share Posted October 20, 2009 Well i tried exit() and die() both but nothing happen i validate the form through W3C but it seems ok, now i actually have rules too if somebody will not fill the form it will display the error on page within PHP but even that is not happening in IE here is my complete code: <?php session_start(); ob_start() ; $title = ""; $name = ""; $lname = ""; $insurance = ""; $address = ""; $phone = ""; $email = ""; $registration = ""; $city =""; $date =""; $comments = ""; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Your description goes here..." /> <meta name="keywords" content="your,keywords,goes,here" /> <link rel="stylesheet" type="text/css" href="../style.css" title="1024px style" media="screen,projection" /> <title>CSCS Health and Safety Registration Form</title> </head> <body onload = "populate()"> <?php include_once("include_header.php");?> <p style="text-align:center;font-size:1.6em;color:#4088b8;padding:0 2px 2px 5px;margin:0 0 10px 0;"><b>CSCS Health and Safety Registration Form</b></p> <br /> <p style="position:absolute; margin-top: 18px; margin-left: 240px; "> <a href="bulkregistration.php"><img src="../images/clickhere.png" alt="" /></a> </p> <h3>For Bulk registrations, Please </h3><br /> <div id="form" style="margin: 20px 90px 10px 90px;"> <?php if(isset($_POST['sub1'])){ $title = $_POST['title']; $name = $_POST['name']; $lname = $_POST['lname']; $insurance = $_POST['insurance']; $postal = $_POST['postal']; $address = $_POST['address']; $phone = $_POST['phone']; $email = $_POST['email']; $registration = $_POST['registration']; $city = $_POST['city']; $date = $_POST['date']; $comments = $_POST['comments']; $_SESSION['title'] = $_POST['title']; $_SESSION['name'] = $_POST['name']; $_SESSION['lname'] = $_POST['lname']; $_SESSION['insurance'] = $_POST['insurance']; $_SESSION['postal'] = $_POST['postal']; $_SESSION['address'] = $_POST['address']; $_SESSION['phone'] = $_POST['phone']; $_SESSION['email'] = $_POST['email']; $_SESSION['city'] = $_POST['city']; $_SESSION['date'] = $_POST['date']; $_SESSION['registration'] = $_POST['registration']; $_SESSION['comments'] = $_POST['comments'];$error = ""; if (!$title) $error = $error."<font color=\"red\">Title </font><br />"; if (!$name) $error = $error."<font color=\"red\">First Name</font> <br />"; if (!$lname) $error = $error."<font color=\"red\">Last Name</font> <br />"; if (!$insurance) $error = $error."<font color=\"red\">National Insurance Number</font> <br />"; if (!$postal) $error = $error."<font color=\"red\">Postal Address</font> <br />"; if (!$address) $error = $error."<font color=\"red\">Address</font> <br />"; if (!$phone) $error = $error."<font color=\"red\">Telephone Number</font> <br />"; if (!$email) $error = $error."<font color=\"red\">Email Address</font> <br />"; if (!$error =="") echo "<font color=\"red\"><b>Please Fill in The Following Required Fields: </b></font><br /> $error"; else {header('Location: payments.php'); exit;}} elseif(isset($_POST['sub2'])){ $title = $_POST['title']; $name = $_POST['name']; $lname = $_POST['lname']; $insurance = $_POST['insurance']; $postal = $_POST['postal']; $address = $_POST['address']; $phone = $_POST['phone']; $email = $_POST['email']; $registration = $_POST['registration']; $city = $_POST['city']; $date = $_POST['date']; $comments = $_POST['comments']; $_SESSION['title'] = $_POST['title']; $_SESSION['name'] = $_POST['name']; $_SESSION['lname'] = $_POST['lname']; $_SESSION['insurance'] = $_POST['insurance']; $_SESSION['postal'] = $_POST['postal']; $_SESSION['address'] = $_POST['address']; $_SESSION['phone'] = $_POST['phone']; $_SESSION['email'] = $_POST['email']; $_SESSION['registration'] = $_POST['registration']; $_SESSION['city'] = $_POST['city']; $_SESSION['date'] = $_POST['date']; $_SESSION['comments'] = $_POST['comments']; $error = ""; if (!$title) $error = $error. "<font color=\"red\">Title</font> <br />"; if (!$name) $error = $error. "<font color=\"red\">First Name</font> <br />"; if (!$lname) $error = $error."<font color=\"red\">Last Name</font> <br />"; if (!$insurance) $error = $error. "<font color=\"red\">National Insurance Number</font> <br />"; if (!$postal) $error = $error."<font color=\"red\">Postal Address</font> <br />"; if (!$address) $error = $error. "<font color=\"red\">Address</font> <br />"; if (!$phone) $error = $error. "<font color=\"red\">Telephone Number</font> <br />"; if (!$email) $error = $error. "<font color=\"red\">Email Address</font> <br />"; if (!$error =="") echo "<font color=\"red\"><b>Please Fill in The Following Required Fields:</b></font> <br /> $error"; else { header('Location: userconfirmation.php'); exit;}} ?> <br /> <form action="registration.php" method="post" name= "myform"> <table width="800px" style="margin-left: -100px;"> <tr> <td align="right"> Title:<span style="color:red;">*</span> </td> <td> <select name = "title" id = "id" style="width: 60px; border:1px solid #4088b8; color:#111111; font-family:Arial; background:#ffffff;"> <option value="Mr." >Mr.</option> <option value="Ms." >Ms.</option> <option value="Mrs." >Mrs.</option> <option value="Miss." >Miss.</option> </select> </td> </tr> <tr> <td align="right"> First Name:<span style="color:red;">*</span> </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="name" value="<?php echo "$name" ?>" /> </td> </tr> <tr> <td align="right"> Last Name:<span style="color:red;">*</span> </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="lname" value="<?php echo "$lname" ?>" /> </td> </tr> <tr> <td align="right"> National Insurance<br /> Number:<span style="color:red;">*</span> </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="insurance" value="<?php echo "$insurance" ?>" /> </td> </tr> <tr> <td align="right"> Address:<span style="color:red;">*</span> </td> <td> <textarea style="border:1px solid #4088b8;" cols="30" rows="5" name="address"><?php echo "$address" ?></textarea> </td> </tr> <tr> <td align="right"> Postal Code:<span style="color:red;">*</span> </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="postal" value="<?php echo "$postal" ?>" /> </td> </tr> <tr> <td align="right"> Telephone Number:<span style="color:red;">*</span> </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="phone" value="<?php echo "$phone" ?>" /> </td> </tr> <tr> <td align="right"> Email:<span style="color:red;">*</span> </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="email" value="<?php echo "$email" ?>" /> </td> </tr> <tr> <td align="right"> CSCS Registration Number: </td> <td> <input style="border:1px solid #4088b8;" type="text" size="29" name="registration" value="<?php echo "$registration" ?>" /> </td> </tr> <tr> <td align="right"> Preferred Test City:<span style="color:red;">*</span> </td> <td> <select name = "city" value="<?php echo "$city" ?>" id = "city" style="width: 200px; border:1px solid #4088b8; color:#111111; font-family:Arial; background:#ffffff;"> <option value="0" >Please Select</option><optgroup label='London Test Centre' style='font-family:Arial; color:#000000; font-style:normal'><option value="Central London" style='font-family:Arial; color:#000000;'> Central London</option><option value="London North" style='font-family:Arial; color:#000000;'> London North</option><option value="London - South" style='font-family:Arial; color:#000000;'> London - South</option><option value="London South East" style='font-family:Arial; color:#000000;'>London South East</option><option value="London - South West" style='font-family:Arial; color:#000000;'>London - South West</option><option value="London East" style='font-family:Arial; color:#000000;'> London East</option><option value="London West" style='font-family:Arial; color:#000000;'> London West</option></optgroup><optgroup label='Outside of London' style='font-family:Arial; color:#000000;'><option value="Aberdeen" style='font-family:Arial; color:#000000;'> Aberdeen</option><option value="Aberystwyth" style='font-family:Arial; color:#000000;'> Aberystwyth</option><option value="Aldershot" style='font-family:Arial; color:#000000;'> Aldershot</option><option value="Ayr" style='font-family:Arial; color:#000000;'> Ayr</option><option value="Ballymena" style='font-family:Arial; color:#000000;'> Ballymena</option><option value="Bangor" style='font-family:Arial; color:#000000;'> Bangor</option><option value="Barnstaple" style='font-family:Arial; color:#000000;'> Barnstaple</option><option value="Barrow" style='font-family:Arial; color:#000000;'> Barrow</option><option value="Basildon" style='font-family:Arial; color:#000000;'> Basildon</option><option value="Basingstoke" style='font-family:Arial; color:#000000;'> Basingstoke</option><option value="Bath" style='font-family:Arial; color:#000000;'> Bath</option><option value="Belfast" style='font-family:Arial; color:#000000;'> Belfast</option><option value="Berwick-Upon-Tweed" style='font-family:Arial; color:#000000;'> Berwick-Upon-Tweed</option><option value="Birkenhead" style='font-family:Arial; color:#000000;'> Birkenhead</option><option value="Birmingham" style='font-family:Arial; color:#000000;'> Birmingham</option><option value="Blackpool" style='font-family:Arial; color:#000000;'> Blackpool</option><option value="Boston" style='font-family:Arial; color:#000000;'> Boston</option><option value="Bournemouth" style='font-family:Arial; color:#000000;'> Bournemouth</option><option value="Bradford" style='font-family:Arial; color:#000000;'> Bradford</option><option value="Brighton" style='font-family:Arial; color:#000000;'> Brighton</option><option value="Bristol" style='font-family:Arial; color:#000000;'> Bristol</option><option value="Builth Wells" style='font-family:Arial; color:#000000;'> Builth Wells</option><option value="Bury (Bolton)" style='font-family:Arial; color:#000000;'> Bury (Bolton)</option><option value="Bury St. Edmunds" style='font-family:Arial; color:#000000;'> Bury St. Edmunds</option><option value="Cambridge" style='font-family:Arial; color:#000000;'> Cambridge</option><option value="Canterbury" style='font-family:Arial; color:#000000;'> Canterbury</option><option value="Cardiff" style='font-family:Arial; color:#000000;'> Cardiff</option><option value="Carlisle" style='font-family:Arial; color:#000000;'> Carlisle</option><option value="Chelmsford" style='font-family:Arial; color:#000000;'> Chelmsford</option><option value="Cheltenham" style='font-family:Arial; color:#000000;'> Cheltenham</option><option value="Chester" style='font-family:Arial; color:#000000;'> Chester</option><option value="Chesterfield" style='font-family:Arial; color:#000000;'> Chesterfield</option><option value="Colchester" style='font-family:Arial; color:#000000;'> Colchester</option><option value="Coventry" style='font-family:Arial; color:#000000;'> Coventry</option><option value="Crawley" style='font-family:Arial; color:#000000;'> Crawley</option><option value="Derby" style='font-family:Arial; color:#000000;'> Derby</option><option value="Doncaster" style='font-family:Arial; color:#000000;'> Doncaster</option><option value="Dudley" style='font-family:Arial; color:#000000;'> Dudley</option><option value="Dumfries" style='font-family:Arial; color:#000000;'> Dumfries</option><option value="Dundee" style='font-family:Arial; color:#000000;'> Dundee</option><option value="Dunfermline" style='font-family:Arial; color:#000000;'> Dunfermline</option><option value="Durham" style='font-family:Arial; color:#000000;'> Durham</option><option value="Eastbourne" style='font-family:Arial; color:#000000;'> Eastbourne</option><option value="Edinburgh" style='font-family:Arial; color:#000000;'> Edinburgh</option><option value="Elgin" style='font-family:Arial; color:#000000;'> Elgin</option><option value="Exeter" style='font-family:Arial; color:#000000;'> Exeter</option><option value="Fareham" style='font-family:Arial; color:#000000;'> Fareham</option><option value="Fort William" style='font-family:Arial; color:#000000;'> Fort William</option><option value="Galashiels" style='font-family:Arial; color:#000000;'> Galashiels</option><option value="Gillingham" style='font-family:Arial; color:#000000;'> Gillingham</option><option value="Glasgow" style='font-family:Arial; color:#000000;'> Glasgow</option><option value="Gloucester" style='font-family:Arial; color:#000000;'> Gloucester</option><option value="Grantham" style='font-family:Arial; color:#000000;'> Grantham</option><option value="Greenock" style='font-family:Arial; color:#000000;'> Greenock</option><option value="Grimsby" style='font-family:Arial; color:#000000;'> Grimsby</option><option value="Harlow" style='font-family:Arial; color:#000000;'> Harlow</option><option value="Harrogate" style='font-family:Arial; color:#000000;'> Harrogate</option><option value="Hastings" style='font-family:Arial; color:#000000;'> Hastings</option><option value="Haverfordwest" style='font-family:Arial; color:#000000;'> Haverfordwest</option><option value="Hereford" style='font-family:Arial; color:#000000;'> Hereford</option><option value="Huddersfield" style='font-family:Arial; color:#000000;'> Huddersfield</option><option value="Hull" style='font-family:Arial; color:#000000;'> Hull</option><option value="Inverness" style='font-family:Arial; color:#000000;'> Inverness</option><option value="Ipswich" style='font-family:Arial; color:#000000;'> Ipswich</option><option value="Isle of Wight" style='font-family:Arial; color:#000000;'> Isle of Wight</option><option value="Kings Lynn" style='font-family:Arial; color:#000000;'> Kings Lynn</option><option value="Kirkwall" style='font-family:Arial; color:#000000;'> Kirkwall</option><option value="Leeds" style='font-family:Arial; color:#000000;'> Leeds</option><option value="Leicester" style='font-family:Arial; color:#000000;'> Leicester</option><option value="Lerwick" style='font-family:Arial; color:#000000;'> Lerwick</option><option value="Lincoln" style='font-family:Arial; color:#000000;'> Lincoln</option><option value="Liverpool" style='font-family:Arial; color:#000000;'> Liverpool</option><option value="Londonderry" style='font-family:Arial; color:#000000;'> Londonderry</option><option value="Lowestoft" style='font-family:Arial; color:#000000;'> Lowestoft</option><option value="Luton" style='font-family:Arial; color:#000000;'> Luton</option><option value="Manchester" style='font-family:Arial; color:#000000;'> Manchester</option><option value="Mansfield" style='font-family:Arial; color:#000000;'> Mansfield</option><option value="Merthyr Tydfil" style='font-family:Arial; color:#000000;'> Merthyr Tydfil</option><option value="Middlesbrough" style='font-family:Arial; color:#000000;'> Middlesbrough</option><option value="Milton Keynes" style='font-family:Arial; color:#000000;'> Milton Keynes</option><option value="Morpeth" style='font-family:Arial; color:#000000;'> Morpeth</option><option value="Motherwell" style='font-family:Arial; color:#000000;'> Motherwell</option><option value="Newcastle" style='font-family:Arial; color:#000000;'> Newcastle</option><option value="Newport (Wales)" style='font-family:Arial; color:#000000;'> Newport (Wales)</option><option value="Newry" style='font-family:Arial; color:#000000;'> Newry</option><option value="Northampton" style='font-family:Arial; color:#000000;'> Northampton</option><option value="Norwich" style='font-family:Arial; color:#000000;'> Norwich</option><option value="Nottingham" style='font-family:Arial; color:#000000;'> Nottingham</option><option value="Oldham" style='font-family:Arial; color:#000000;'> Oldham</option><option value="Omagh" style='font-family:Arial; color:#000000;'> Omagh</option><option value="Oxford" style='font-family:Arial; color:#000000;'> Oxford</option><option value="Penzance" style='font-family:Arial; color:#000000;'> Penzance</option><option value="Peterborough" style='font-family:Arial; color:#000000;'> Peterborough</option><option value="Pitlochry" style='font-family:Arial; color:#000000;'> Pitlochry</option><option value="Plymouth" style='font-family:Arial; color:#000000;'> Plymouth</option><option value="Portadown" style='font-family:Arial; color:#000000;'> Portadown</option><option value="Portree" style='font-family:Arial; color:#000000;'> Portree</option><option value="Portsmouth" style='font-family:Arial; color:#000000;'> Portsmouth</option><option value="Preston" style='font-family:Arial; color:#000000;'> Preston</option><option value="Wokingham (Reading)" style='font-family:Arial; color:#000000;'> Wokingham (Reading)</option><option value="Rhyl" style='font-family:Arial; color:#000000;'> Rhyl</option><option value="Runcorn" style='font-family:Arial; color:#000000;'> Runcorn</option><option value="Salisbury" style='font-family:Arial; color:#000000;'> Salisbury</option><option value="Scarborough" style='font-family:Arial; color:#000000;'> Scarborough</option><option value="Scunthorpe" style='font-family:Arial; color:#000000;'> Scunthorpe</option><option value="Sheffield" style='font-family:Arial; color:#000000;'> Sheffield</option><option value="Shrewsbury" style='font-family:Arial; color:#000000;'> Shrewsbury</option><option value="Sidcup" style='font-family:Arial; color:#000000;'> Sidcup</option><option value="Slough" style='font-family:Arial; color:#000000;'> Slough</option><option value="Solihull" style='font-family:Arial; color:#000000;'> Solihull</option><option value="Southampton" style='font-family:Arial; color:#000000;'> Southampton</option><option value="Southend on Sea" style='font-family:Arial; color:#000000;'> Southend on Sea</option><option value="St. Helens" style='font-family:Arial; color:#000000;'> St. Helens</option><option value="Staines" style='font-family:Arial; color:#000000;'> Staines</option><option value="Stevenage" style='font-family:Arial; color:#000000;'> Stevenage</option><option value="Stirling" style='font-family:Arial; color:#000000;'> Stirling</option><option value="Stockport" style='font-family:Arial; color:#000000;'> Stockport</option><option value="Stoke-on-Trent" style='font-family:Arial; color:#000000;'> Stoke-on-Trent</option><option value="Stornoway" style='font-family:Arial; color:#000000;'> Stornoway</option><option value="Stranraer" style='font-family:Arial; color:#000000;'> Stranraer</option><option value="Sunderland" style='font-family:Arial; color:#000000;'> Sunderland</option><option value="Sutton Coldfield" style='font-family:Arial; color:#000000;'> Sutton Coldfield</option><option value="Swansea" style='font-family:Arial; color:#000000;'> Swansea</option><option value="Swindon" style='font-family:Arial; color:#000000;'> Swindon</option><option value="Tarbert" style='font-family:Arial; color:#000000;'> Tarbert</option><option value="Taunton" style='font-family:Arial; color:#000000;'> Taunton</option><option value="Torquay" style='font-family:Arial; color:#000000;'> Torquay</option><option value="Truro" style='font-family:Arial; color:#000000;'> Truro</option><option value="Ullapool" style='font-family:Arial; color:#000000;'> Ullapool</option><option value="Watford" style='font-family:Arial; color:#000000;'> Watford</option><option value="Weymouth" style='font-family:Arial; color:#000000;'> Weymouth</option><option value="Wick" style='font-family:Arial; color:#000000;'> Wick</option><option value="Wigan" style='font-family:Arial; color:#000000;'> Wigan</option><option value="Wolverhampton" style='font-family:Arial; color:#000000;'> Wolverhampton</option><option value="Worcester" style='font-family:Arial; color:#000000;'> Worcester</option><option value="Workington" style='font-family:Arial; color:#000000;'> Workington</option><option value="Worthing" style='font-family:Arial; color:#000000;'> Worthing</option><option value="Yeovil" style='font-family:Arial; color:#000000;'> Yeovil</option><option value="York" style='font-family:Arial; color:#000000;'> York</option><option value="Guildford" style='font-family:Arial; color:#000000;'> Guildford</option></optgroup> </select> </td> </tr> <tr> <td align="right"> Preferred Test Date:<span style="color:red;">*</span> </td> <td> <select name = "date" value="<?php echo "$date" ?>" id = "date" style="width: 200px; border:1px solid #4088b8; color:#111111; font-family:Arial; background:#ffffff;"> <option value="0" >Please Select</option> <option value = "d0"></option> <option value = "d1"></option> <option value = "d2"></option> <option value = "d3"></option> <option value = "d4"></option> <option value = "d5"></option> <option value = "d6"></option> <option value = "d7"></option> <option value = "d8"></option> <option value = "d9"></option> <option value = "d10"></option> <option value = "d11"></option> <option value = "d12"></option> <option value = "d13"></option> <option value = "d14"></option> <option value = "d15"></option> <option value = "d16"></option> <option value = "d17"></option> <option value = "d18"></option> <option value = "d19"></option> <option value = "d20"></option> <option value = "d21"></option> <option value = "d22"></option> <option value = "d23"></option> <option value = "d24"></option> <option value = "d25"></option> <option value = "d26"></option> <option value = "d27"></option> <option value = "d28"></option> <option value = "d29"></option> </select> </td> </tr> <tr> <td align="right"> Special Accommodations: </td> <td> <textarea style="border:1px solid #4088b8;" cols="30" rows="5" name="comments"><?php echo "$comments" ?></textarea> </td> </tr> <tr><td> </td></tr> <tr><td> </td> <td colspan="2"><input type="image" src="../images/payment.png" name="sub1" value="Payment" /> <input type="image" src="../images/request.png" name="sub2" value="Request Information" /></td> </tr> </table></form> <script type = "text/javascript"> function populate() { var months=['January','February','March','April','May','June','July','August','Septemeber','October','November','Decemeber'] var days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]; var c = 0; for (var i =0; i<30; i++) { var nd = new Date(); nd.setMonth(nd.getMonth()); nd.setDate(nd.getDate() + c); // next 10 days var mn = nd.getMonth(); var dy = nd.getDate(); var yy = nd.getFullYear(); var day = nd.getDay(); c++; if (( day == 0) || (day == 6)) { // omit Sun and Sat i--; } else { var d = days[day] + ", " + months[mn] + " " + dy + ", " + yy; document.myform.date.options[i].text = d; var vald = dy + "/" + (mn*1+1) +"/" + yy; document.myform.date.options[i].value = vald; // change the option value } } } </script> </div><?php include_once("sidebar_reg.php");?><?php include_once("include_footer.php");?> </body> </html> <?php ob_flush() ?> Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940560 Share on other sites More sharing options...
mrMarcus Posted October 20, 2009 Share Posted October 20, 2009 SemiApocalyptic already gave you your answer .. using an image as the submit button means you must then add an _x, to you $_POST, ie. if(isset($_POST['sub1_x'])) { will work. Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940568 Share on other sites More sharing options...
mraza Posted October 20, 2009 Author Share Posted October 20, 2009 Thanks SemiApocalyptic and mrMarcus it worked wow... Quote Link to comment https://forums.phpfreaks.com/topic/178353-solved-header-is-not-working-in-ie/#findComment-940573 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.