Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- mysql_connect("localhost", "root", "");
- mysql_select_db("front");
- $submit=$_GET['str'] ;
- $sql = mysql_query("SELECT * FROM searcengine WHERE pagecontent LIKE '%$_GET[$submit]%' ");
- while($row=mysql_fetch_array($sql)) {
- echo "<img src=image_2.php?pagecontent=".$row['pagecontent']." />";
- }
- ?>
- <?php
- ini_set('display_errors',1);
- error_reporting(E_ALL);
- $conn = mysql_connect("localhost","root","");
- if(!$conn)
- {
- echo mysql_error();
- }
- $db = mysql_select_db("front",$conn);
- if(!$db)
- {
- echo mysql_error();
- }
- $pagecontent = $_GET['pagecontent'];
- $q = "SELECT pageurl FROM searchengine where pagecontent='$pagecontent'";
- $sql = mysql_query("$q",$conn);
- if($sql)
- {
- $row = mysql_fetch_array($sql);
- header("Content-type: image/jpeg");
- echo $row['pageurl'];
- }
- else
- {
- echo mysql_error();
- }
- ?>
- <?php
- $con=mysqli_connect("localhost","root","","front");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $submit=$_GET['str'] ;
- $sql="SELECT * FROM 'searchengine' WHERE 'pagecontent' = '%$submit%' ";
- if ($result=mysqli_query($con,$sql))
- {
- // Fetch one and one row
- while ($row=mysqli_fetch_assoc($result)) {
- echo "<img src=image_2.php?pagecontent=".$row['pagecontent']." />";
- }
- }
- mysqli_close($con);
- ?>
- <?php
- $con=mysqli_connect("localhost","root","","front");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $pagecontent = $_GET['pagecontent'];
- if (!empty($pagecontent)) {
- $sql= "SELECT 'pageurl' FROM 'searchengine' where 'pagecontent'='$pagecontent'";
- if ($result=mysqli_query($con,$sql))
- {
- while ($row = mysqli_fetch_assoc($result));
- header("Content-type: image/jpeg");
- echo $row['pageurl'];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement