database - how to take the url from the url and compare it to a given table in php -


<button type="button" class="btn btn-primary">     <?php echo $_get['url']; ?> </button>  <?php      $goturl=$_get['url'];      $con=mysqli_connect("localhost","stud_user","123456","stud_db");      if (mysqli_connect_errno()){         echo "oops! ran problem!" . mysqli_connect_error();     }      $result = mysqli_query($con,"select * users url='<?=$goturl;?>'");      while($row = mysqli_fetch_array($result)){         echo $row['verification_value'];     }      if($verification_value == 'unverified'){          $val = 'unverified';     } else {          $val = 'verified';     } ?>  <button type="button" class="btn btn-info"> <?php echo $val; ?> </button> <br />   <?php mysqli_close($con); ?> <hr /> 

hi newbie in php , m using code fetch site.php?url=website.com , use fetched url check given db seems m not able make work m missing cannot understand. show url verified. doing wrong here? please me thank lot help! :)

try this

$goturl = $_get['url']; $goturl = mysqli_real_escape_string($con, $goturl);   $result = mysqli_query($con,"select * users url='$goturl' limit 1"); if($row = mysqli_fetch_array($result)) {     echo $row['verification_value']; } else {     echo "no in table"; } 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -