dimanche 2 octobre 2016

php if is chekced get header redirect

i'm creating button, if user turn on this button redirect with "header('Refresh:" Below is my code,

<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" checked>
<label class="onoffswitch-label" for="myonoffswitch">
    <span class="onoffswitch-inner"></span>
    <span class="onoffswitch-switch"></span>
</label>

and if this button is turn on get echo and redirect user on another url

header('Refresh: '.$duration.'; URL=http://ift.tt/2dnoEav'.$row[single_perm].'/'.$link.'/'.url_slug($unname, array('transliterate' => true)).''.$row[single_end].'');

Aucun commentaire:

Enregistrer un commentaire