php den Redirect bağlantı

0 Cevap php

Sevgili tüm

I have database of website link, it list out in main file ,when i try to click that link it get to redirect on that database link. my code is:

file: test.php

 <?php
     // getting from database
     echo '<li onclick=\"window.location='.$result->website.'\">
           <a href="#">'.$result->option.'</a></li>';
 ?>

The Main.html calls that test.php
while ajax

$.post("test.php", {queryString: ""+inputString+""}, function(data){

});

how to do it? any idea Is it possible with serverside script? whats wrong with my php code?

0 Cevap