Advertisement
Guest User

Untitled

a guest
Jun 6th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.63 KB | None | 0 0
  1. <?php
  2. if(isset($_COOKIE['adresse'])) {
  3.     echo $_COOKIE['adresse'];
  4. }
  5.  
  6. include 'postnummere.php';
  7. $time = time()+3600;
  8. $url_egedal = "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/cms/brugtmarked-i-egedal'>";
  9.  
  10.  
  11. //sammenligning af postkoder og redirection
  12. if (isset($_POST['postnr'])) {  
  13.  
  14.         if(in_array($_POST['postnr'], $egedal_kom)) {
  15.    
  16.             setcookie("adresse","$url_egedal",$time);
  17.            
  18.             echo "$url_egedal";
  19.             }
  20.  
  21.              
  22.              
  23.              
  24.              
  25.              
  26.  
  27.         elseif(in_array($_POST['postnr'], $ballerup_kom)) {
  28.  
  29.            
  30.             echo "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/cms/brugtmarked-i-ballerup'>";
  31.             }
  32.        
  33.         elseif(in_array($_POST['postnr'], $kobenhavn_kom)) {
  34.  
  35.            
  36.             echo "<meta http-equiv='refresh' content='0;url=http://www.tilsalgi.dk/cms/brugtmarked-i-kobenhavn'>";
  37.             }
  38.        
  39.        
  40.         else
  41.             {
  42.             echo "<meta http-equiv='refresh' content='0;url=http://tilsalgi.dk/ejfundet.php'>";
  43.            
  44.             }
  45.            
  46.     }
  47.            
  48.            
  49. ?>
  50. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  51.  
  52.  
  53.  
  54. <center>
  55.   <p>&nbsp;</p>
  56.   <p>&nbsp;</p>
  57.   <p>&nbsp;</p>
  58.   <img src="http://www.tilsalgi.dk/cms/images/web_assets/logo_mobile.png" /><p>&nbsp;</p><p>&nbsp;</p>
  59.  
  60. <table width="300" border="0" cellspacing="0" cellpadding="0">
  61.   <tr>
  62.     <td align="center">
  63.     <b><h2>Indtast dit postnummer</h2>
  64.     </b>
  65.     <i>Huskes automatisk til næste besøg</i>
  66.    
  67.     <form name="form" method="post">
  68.      
  69.      
  70.       <input name="postnr" type="text"  size="10" maxlength="4">
  71.      
  72.      
  73.         <input type="submit"  value="OK">
  74.      
  75.   </form></td>
  76.   </tr>
  77. </table>
  78.  
  79.  
  80. </center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement