php - Page Redirection not working after hosting -
this question has answer here:
- how fix “headers sent” error in php 11 answers
i trying redirect page according text value using switch , button click, working fine in localhost not working after hosting. please overcome problem.. looking forward it. thanks.
form coding
<form id="accounform" class="form-horizontal" method="post" action="redirect.php" > <input type="hidden" value ="<?php echo( htmlspecialchars( $row['jewellery_name'] ) ); ?>" name="textboxdata" > <input type = "submit" class="btn btn-blue" name = "submit" value = "add another"> </form>
redirect.php
<?php session_start(); ob_start(); $textboxdata = $_post['textboxdata']; if (isset($textboxdata)) { switch ($textboxdata) { case col: header("location: new_item_5piececollar.php"); exit(); case bab: header("location: new_item_babybangle.php"); exit(); case brr: header("location: new_item_babyring.php"); exit(); case bal: header("location: new_item_balla.php"); exit(); case brc: header("location: new_item_bracelet.php"); exit(); case but: header("location: new_item_button.php"); exit(); case cna: header("location: new_item_chain.php"); exit(); case chk: header("location: new_item_choker.php"); exit(); case chr: header("location: new_item_chur.php"); exit(); case chu: header("location: new_item_churi.php"); exit(); case dul: header("location: new_item_dull.php"); exit(); case fba: header("location: new_item_fullballaakshi.php"); exit(); case grr: header("location: new_item_gentsring.php"); exit(); case hnk: header("location: new_item_helenecklace.php"); exit(); case sob: header("location: new_item_hsocketbouti.php"); exit(); case jhu: header("location: new_item_jhumka.php"); exit(); case kan: header("location: new_item_kaan.php"); exit(); case lrr: header("location: new_item_ladiesring.php"); exit(); case lkt: header("location: new_item_locket.php"); exit(); case nkl: header("location: new_item_longnecklace.php"); exit(); case mak: header("location: new_item_makhri.php"); exit(); case mgs: header("location: new_item_mangalsutra.php"); exit(); case man: header("location: new_item_mantasha.php"); exit(); case noa: header("location: new_item_noah.php"); exit(); case not: header("location: new_item_noth.php"); exit(); case pdt: header("location: new_item_pendent.php"); exit(); case pol: header("location: new_item_pola.php"); exit(); case sac: header("location: new_item_sankha.php"); exit(); case tan: header("location: new_item_tana.php"); exit(); case tck: header("location: new_item_tickli.php"); exit(); case top: header("location: new_item_tops.php"); exit(); case nck: header("location: new_item_entry.php"); exit(); case wri: header("location: new_item_wrislet.php"); exit(); default: echo "enter number please."; } } ob_end_flush(); ?>
remove white space before openning tag
Comments
Post a Comment