<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>search images using php-mysql Archives -</title>
	<atom:link href="https://mitindia.in/tag/search-images-using-php-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://mitindia.in/tag/search-images-using-php-mysql/</link>
	<description></description>
	<lastBuildDate>Sat, 26 Nov 2016 07:10:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://mitindia.in/wp-content/uploads/2023/03/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>search images using php-mysql Archives -</title>
	<link>https://mitindia.in/tag/search-images-using-php-mysql/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Searching Images using PHP</title>
		<link>https://mitindia.in/searching-images-using-php/</link>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Wed, 22 Jun 2016 10:45:29 +0000</pubDate>
				<category><![CDATA[PHP-MySQL]]></category>
		<category><![CDATA[search images using php-mysql]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=147</guid>

					<description><![CDATA[<p>To search images using PHP from MySQL Database, follow the examples. First of all create a table in MySQL database with following fields. Now, insert some images by clicking on &#8220;insert&#8221; tab in MySQL. Now, create a HTML page as following tags. &#60;html&#62; &#60;body&#62; &#60;h1&#62; Image searching.........&#60;/h1&#62; &#60;form name=f1 action="image.php" method="GET"&#62; Enter image Id: &#60;input [&#8230;]</p>
<p>The post <a href="https://mitindia.in/searching-images-using-php/">Searching Images using PHP</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>To search images using PHP from MySQL Database, follow the examples.</p>
<p>First of all create a table in MySQL database with following fields.</p>
<div class="separator"><img decoding="async" class="alignnone" src="http://1.bp.blogspot.com/-QDY1ToNfOe8/VhO_9IwnzBI/AAAAAAAAA6E/y9W2Ute0Z8E/s320/table.JPG" width="320" height="156" border="0" /></div>
<p>Now, insert some images by clicking on &#8220;insert&#8221; tab in MySQL.</p>
<div class="separator"><img fetchpriority="high" decoding="async" class="alignnone" src="http://1.bp.blogspot.com/-zD1dEwiriFE/VhPAgDJDfaI/AAAAAAAAA6M/pyvyGFoz7Yo/s640/browse_mysql_image.JPG" width="640" height="163" border="0" /></div>
<p>Now, create a HTML page as following tags.</p>
<pre>&lt;html&gt;
&lt;body&gt;
&lt;h1&gt; Image searching.........&lt;/h1&gt;
&lt;form name=f1 action="image.php" method="GET"&gt;
Enter image Id: &lt;input type=text name=t1&gt;
&lt;input type=submit value="Display"&gt; 
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>After creating above HTML page, now create PHP config file with following code in it.[save as &#8220;config.php&#8221;] this file contains database name, user, password etc.</p>
<pre>&lt;?php
      $host="localhost";
      $username="root";
      $password="";
      $dbname="mars_db";
      $con=mysql_connect("$host","$username","$password");
      mysql_select_db("$dbname",$con);
?&gt;</pre>
<p>Now create PHP file to search stored images in database.<br />
Copy the following code and save as &#8220;image.php&#8221;.</p>
<pre>&lt;?php
$key=$_GET['t1'];
include './config.php';
@mysql_connect($host, $username, $password) or die("Can not connect to database: ".mysql_error());

@mysql_select_db($dbname) or die("Can not select the database: ".mysql_error());

$query = mysql_query("SELECT * FROM photo WHERE pid=' ".$key."'");

$row = mysql_fetch_assoc($query);

$contents = $row['content'];

header("Content-type: image/jpg");
echo $contents;
?&gt;</pre>
<p>Now, run HTML page as following.</p>
<div class="separator"><img decoding="async" class="alignnone" src="http://2.bp.blogspot.com/-IPpBhsH24-8/VhPCNp11dAI/AAAAAAAAA6Y/k1bNorQfGxs/s400/image.JPG" width="400" height="197" border="0" /></div>
<div class="separator"></div>
<p>Finally the output looks like this.</p>
<div class="separator"><img loading="lazy" decoding="async" class="alignnone" src="http://3.bp.blogspot.com/-nhTetDTJlKc/VhPCuj_-jSI/AAAAAAAAA6g/gCIEPc8rXoo/s320/image_with_output.JPG" width="320" height="276" border="0" /></div>
<p>That&#8217;s all for now!, Thank you for reading!</p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fsearching-images-using-php%2F&amp;linkname=Searching%20Images%20using%20PHP" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fsearching-images-using-php%2F&amp;linkname=Searching%20Images%20using%20PHP" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fsearching-images-using-php%2F&#038;title=Searching%20Images%20using%20PHP" data-a2a-url="https://mitindia.in/searching-images-using-php/" data-a2a-title="Searching Images using PHP"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/searching-images-using-php/">Searching Images using PHP</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
