title: Go to link with previous word
body: <p>I have this: </p>
  
  <pre><code>    if(mysql_num_rows($raw_results) &gt; 0){ // if one or more rows are returned do following
  
          while($results = mysql_fetch_array($raw_results)){
          // $results = mysql_fetch_array($raw_results) puts data from database into array, while it's valid it does the loop
          if
              ($results['cod'] == $query){             
              header('Location: /shop-'$results['cod']'.html'); 
                  }
              // posts results gotten from database(title and text) you can also show id ($results['id'])
          }
  
      }
  </code></pre>
  
  <p>And i wanna go to => webiste.xx/shop-PREVIOUSLY WORD INTRODUCED ($query).html. How can i do this?</p>