tag:blogger.com,1999:blog-46699509694202832852024-02-19T13:38:00.959-08:00PHP and Dotnet Training in Vadodara - Web Development Company VadodaraPace Infonet Web Solutions Pvt. Ltd. is a premium IT service provider with its presence at multiple locations in India and abroad. The company was established in 2007 at Mumbai and is offering high quality products/services in Web Development, Web Hosting & IT Training sectors.Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.comBlogger88125tag:blogger.com,1999:blog-4669950969420283285.post-65076922551942145302014-09-09T02:09:00.002-07:002014-09-09T02:09:28.182-07:00multiple file upload php script<div dir="ltr" style="text-align: left;" trbidi="on">
In this php tutorial let us check multiple file upload functionality using php script. This multiple file upload php script will help you to upload multiple files to your website very easily. This multiple file upload php script will also help you to restrict upload file type. Eg: you can tell the script to upload pdf file only, or upload pdf,jpg,doc file only ect by simply giving some configuring option.
Let us check how you can write the code for uploading multiple file in detail.
<strong>First of all let us check the html part.</strong>
In the html we need a file uploading functionality. So The HTML code for multiple file upload is
<br />
<pre><code><form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="files[]" multiple/>
<input type="submit" value="submit"/>
</form></code></pre>
In the above html code it will give you an option to select multiple files. In the form for uploading files you need to specify enctype to multipart/form-data. This is an impotent think. if you didn’t give this option your file upload will not work. in the input field i specified name=”upload_files[]“ this is because if it will take care of multiple file upload_files[] will give an array of file names. also don’t forget to give multiple in the input filed.
<strong>The next is the php section.</strong>
In this php section we are going to write the php script to upload multiple file. Let us check it in detail.
<br />
<pre><code>
function
upload_multiple_file($file,$file_dir="user_files") {
$overwrite=0;
$allowed_file_type = array("pdf","ppt","pptx","xls"."xlxs","doc","docx","jpg", "jpeg", "png", "gif");
$max_file_size_check=1;
$max_file_size = 2097152;
foreach($_FILES['files']['name'] as $fkey=> $fname){
$ext = pathinfo($fname, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed_file_type)) {
return "unsupported file format";
break;
}
}
foreach($_FILES['files']['tmp_name'] as $key => $tmp_name ){
$file_name = $_FILES['files']['name'][$key];
$file_size =$_FILES['files']['size'][$key];
$file_tmp_name =$_FILES['files']['tmp_name'][$key];
$file_type=$_FILES['files']['type'][$key];
if($max_file_size_check < 1) {
if($file_size > $max_file_size){
$fsize=$max_file_size/1048576;
return 'File size must be less than '.$fsize.' MB';
break;
}
}
if(is_dir($file_dir)==false){
$status = mkdir("$file_dir", 0700);
if($status < 1){
return "unable to create diractory $file_dir ";
}
}
if(is_dir($file_dir)){
if($overwrite < 1){
move_uploaded_file($file_tmp_name,"$file_dir/".$file_name);
}
}
// $file_upload_query="INSERT into user_uploads (`u_id`,`file_name`,`file_type`) VALUES('$user_id','$file_name','$file_size','$file_type'); ";
//mysql_query($file_upload_query);
}
return "Success";
}</code></pre>
In the above code upload_multiple_file is the function which is doing all multiple file upload functionality. The upload_multiple_file function need two parameter. The first one is upload file information, and the second one is the file directory where you need to upload the file.
The $overwrite=0; variable is used for checking whether the file having the same name need to be overwrite or not. If you want to overwrite the file make $overwrite to 1. $overwrite=1;
The $allowed_file_type array is having the list of allowed file types. If you want to remove or add any file type you can change the $allowed_file_type array accordingly.
The $max_file_size_check=1 is for file size checking. If $max_file_size_check=1; the function will check the upload file size. If $max_file_size_check=0; the function will slip the file size check.
The $max_file_size = 2097152; is the maximum allowed size of the upload file.
In this I also added a mysql insert query $file_upload_query this query will help you to insert the uploaded file information to database. If you want to use the database insert functionality you can uncomment those lines.
If you want to store the uploaded file information in database you need to create a database table. You can create sql table by using sql query below.
<strong>Sql part .</strong>
<br />
<pre><code>
CREATE
TABLE `test`.`user_uploads` (
`id` INT( 11 ) NOT NULL ,
`u_id` INT( 11 ) NOT NULL ,
`file_name` VARCHAR( 255 ) NOT NULL ,
`file_type` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;</code></pre>
<strong></strong>[highlight textcolor="#00aae8" bgcolor="#fff"]<strong>The usage of the function</strong>[/highlight] is below.
<br />
<pre><code>
if
(isset($_FILES['files'])){
$res = upload_multiple_file($_FILES['files'],"user_files");
echo $res;
}</code></pre>
<strong></strong><strong>So let us put all code together</strong>, so that it will easy to understand multiple file upload php script tutorial.
<br />
<pre><code>
<?php
if(isset($_FILES['files'])){
$res = upload_multiple_file($_FILES['files'],"user_files");
echo $res;
}
function upload_multiple_file($file,$file_dir="user_files") {
$overwrite=0;
$allowed_file_type= array("pdf","ppt","pptx","xls"."xlxs","doc","docx","jpg", "jpeg", "png", "gif");
$max_file_size = 2097152;
foreach($_FILES['files']['name'] as $fkey=> $fname){
$ext = pathinfo($fname, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed_file_type)) {
return "unsupported file format";
break;
}
}
foreach($_FILES['files']['tmp_name'] as $key => $tmp_name ){
$file_name = $_FILES['files']['name'][$key];
$file_size =$_FILES['files']['size'][$key];
$file_tmp_name =$_FILES['files']['tmp_name'][$key];
$file_type=$_FILES['files']['type'][$key];
if($max_file_size_check >0) {
if($file_size > $max_file_size){
$fsize=$max_file_size/1048576;
return 'File size must be less than '.$fsize.' MB';
break;
}
}
if(is_dir($file_dir)==false){
$status = mkdir("$file_dir", 0700);
if($status < 1){
return "unable to create diractory $file_dir ";
}
}
if(is_dir($file_dir)){
if($overwrite < 1){
move_uploaded_file($file_tmp_name,"$file_dir/".$file_name);
}
}
// $file_upload_query="INSERT into user_uploads (`u_id`,`file_name`,`file_type`) VALUES('$user_id','$file_name','$file_size','$file_type'); ";
//mysql_query($file_upload_query);
}
return "Success";
}
?>
<form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="files[]" multiple/>
<input type="submit" value="submit"/>
</form></code></pre>
<strong><a href="http://paceinfonet.org/wp-content/uploads/multiple_file_upload_php_script.zip">Download Here</a></strong></div>
Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-23944079709238632272014-08-12T05:18:00.003-07:002014-08-12T05:18:46.675-07:00Indian states list in php array format<div dir="ltr" style="text-align: left;" trbidi="on">
I listed the Indian country states in PHP array format. The array contains two digit state code and state name. India has 28 states and seven Union territory, so totally 35 states are listed in the array. I hope it will help someone.<br />
<br />
<br />
<br />
28 Indian States list<br />
<br />
<br />
<br />
$indian_states = array (<br />
'AP' => 'Andhra Pradesh',<br />
'AR' => 'Arunachal Pradesh',<br />
'AS' => 'Assam',<br />
'BR' => 'Bihar',<br />
'CT' => 'Chhattisgarh',<br />
'GA' => 'Goa',<br />
'GJ' => 'Gujarat',<br />
'HR' => 'Haryana',<br />
'HP' => 'Himachal Pradesh',<br />
'JK' => 'Jammu & Kashmir',<br />
'JH' => 'Jharkhand',<br />
'KA' => 'Karnataka',<br />
'KL' => 'Kerala',<br />
'MP' => 'Madhya Pradesh',<br />
'MH' => 'Maharashtra',<br />
'MN' => 'Manipur',<br />
'ML' => 'Meghalaya',<br />
'MZ' => 'Mizoram',<br />
'NL' => 'Nagaland',<br />
'OR' => 'Odisha',<br />
'PB' => 'Punjab',<br />
'RJ' => 'Rajasthan',<br />
'SK' => 'Sikkim',<br />
'TN' => 'Tamil Nadu',<br />
'TR' => 'Tripura',<br />
'UK' => 'Uttarakhand',<br />
'UP' => 'Uttar Pradesh',<br />
'WB' => 'West Bengal',<br />
);<br />
<br />
<br />
7 Union Territory<br />
<br />
<br />
<br />
$indian_union_territory = array (<br />
'AN' => 'Andaman & Nicobar',<br />
'CH' => 'Chandigarh',<br />
'DN' => 'Dadra and Nagar Haveli',<br />
'DD' => 'Daman & Diu',<br />
'DL' => 'Delhi',<br />
'LD' => 'Lakshadweep',<br />
'PY' => 'Puducherry',<br />
);<br />
<br />
<br />
All Indian States list<br />
<br />
<br />
<br />
$indian_all_states = array (<br />
'AP' => 'Andhra Pradesh',<br />
'AR' => 'Arunachal Pradesh',<br />
'AS' => 'Assam',<br />
'BR' => 'Bihar',<br />
'CT' => 'Chhattisgarh',<br />
'GA' => 'Goa',<br />
'GJ' => 'Gujarat',<br />
'HR' => 'Haryana',<br />
'HP' => 'Himachal Pradesh',<br />
'JK' => 'Jammu & Kashmir',<br />
'JH' => 'Jharkhand',<br />
'KA' => 'Karnataka',<br />
'KL' => 'Kerala',<br />
'MP' => 'Madhya Pradesh',<br />
'MH' => 'Maharashtra',<br />
'MN' => 'Manipur',<br />
'ML' => 'Meghalaya',<br />
'MZ' => 'Mizoram',<br />
'NL' => 'Nagaland',<br />
'OR' => 'Odisha',<br />
'PB' => 'Punjab',<br />
'RJ' => 'Rajasthan',<br />
'SK' => 'Sikkim',<br />
'TN' => 'Tamil Nadu',<br />
'TR' => 'Tripura',<br />
'UK' => 'Uttarakhand',<br />
'UP' => 'Uttar Pradesh',<br />
'WB' => 'West Bengal',<br />
'AN' => 'Andaman & Nicobar',<br />
'CH' => 'Chandigarh',<br />
'DN' => 'Dadra and Nagar Haveli',<br />
'DD' => 'Daman & Diu',<br />
'DL' => 'Delhi',<br />
'LD' => 'Lakshadweep',<br />
'PY' => 'Puducherry',<br />
);<br />
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com1tag:blogger.com,1999:blog-4669950969420283285.post-74260140511709226582014-06-14T05:25:00.001-07:002014-06-14T05:25:28.872-07:00jQuery Change Opacity of Image on Mouseover<p>Here I will explain how to use jQuery to change image opacity on mouseover using jQuery or change opacity of image on hover using jQuery.<br/><code/></p><br/><pre><html xmlns="http://www.w3.org/1999/xhtml"><br/><head><br/><title>jQuery Change Image Opacity on Mouse Over</title><br/><script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script><br/><script type="text/javascript"><br/>$(function() {<br/>$("#logoimage").css("opacity", 0.5);<br/>$("#logoimage").hover(function() {<br/>$(this).animate({ opacity: 1.0 }, 500);<br/>}, function() {<br/>$(this).animate({ opacity: 0.5 }, 500);<br/>});<br/>})<br/></script><br/></head><br/><body><br/><form id="form1"><br/><div><br/><img id="logoimage" src="FinalLogo.png" /><br/></div><br/></form><br/></body><br/></html></pre><br/> <br/><a href='http://paceinfonet.org/jquery-change-opacity-of-image-on-mouseover'>jQuery Change Opacity of Image on Mouseover</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-64069032123186764122014-06-03T21:39:00.001-07:002014-06-03T21:39:57.159-07:00Full width image slider for your homepage<p>In this tutorial i want to show you how easily you can change the way of how homeslider appears in default-bootstrap template in PrestaShop 1.6. As you know default homeslider module is a part of homepage of your shop. It appears right below the main menu. Near the module (on right hand side) you can see two small banners. In this guide i will show you how to remove these banners, and how to change width of slider to 100%.</p><br/><p style='text-align: center;'><img src='http://paceinfonet.org/wp-content/uploads/full-width-slider.jpg' alt='full-width-slider' class='aligncenter size-full wp-image-1989'/></p><br/><p><strong>Disable to small banners on the right hand side</strong></p><br/><p>First step in our modificaiton: we have to remove two small banners on the right hand side of the main slider. These images are a part of “theme configurator” module and to remove these banners we just have to disable this module. <strong>But be aware, don’t disable module at all</strong>, just disable it in hook named displayTopColumn. In this case go to modules > positions tab in back office. Search there for modules list named <strong>displayTopColumn</strong>. You will see there two modules (by default there are two modules). Click on edit button near theme configurator and click on “unhook”, exactly as i show on image below.</p><br/><p style='text-align: center;'>Unhooking theme configurator module from displayTopColumn position</p><br/><p style='text-align: center;'><img src='http://paceinfonet.org/wp-content/uploads/1-unhook-theme-configurator-from-theme-configurator.jpg' alt='1-unhook-theme-configurator-from-theme-configurator' class='aligncenter size-full wp-image-1990'/></p><br/><p>After this action two small baners will disappear but they will left blank empty space. So we have to fill this blank space with our slider module. Then it will have full width <img class='wp-smiley' alt=':)' src='http://paceinfonet.org/wp-includes/images/smilies/icon_smile.gif'/></p><br/><p><strong>Change width of the banner</strong></p><br/><p>Go to modules > modules tab and search for “image slider for your homepage” addon. Click on configure button near this module and then – you will be redirected to module configuration page. In the main “settings” form change Max width param value from 799px to 1170px (just type 1170 in this field exactly as i show below). Wondering why 1170? 1170 is a width of the main page container.</p><br/><p style='text-align: center;'>changing width of the default home slider module from 799 to 1170</p><br/><p style='text-align: center;'><img src='http://paceinfonet.org/wp-content/uploads/2a-image-slider-full-width-prestashop-1-6.jpg' alt='2a-image-slider-full-width-prestashop-1-6' class='aligncenter size-full wp-image-1991'/></p><br/><p><strong>Removing banners with width smaller than 1170</strong></p><br/><p>Due to the fact that we changed width of the slider window, we have to remove old smaller than 1170px (width) pictures that we uploaded. We have to upload pictures with min-width: 1170px; On screenshot below i show how to remove actual slides. Below the “settings” form (where you changed width of slider) you can manage already uploaded slides. Just hit on delete button like i show:</p><br/><p style='text-align: center;'>removing default slides with old small width value (799)</p><br/><p style='text-align: center;'><img src='http://paceinfonet.org/wp-content/uploads/2b-remove-slides-imageslider.jpg' alt='2b-remove-slides-imageslider' class='aligncenter size-full wp-image-1992'/></p><br/><p><strong>Upload images with new sizes</strong></p><br/><p style='text-align: left;'>If you removed all old slides with wrong width – now it’s time to upload new pictures. So, you have to prepare own slides for example in photoshop or other desktop software. Create slides with width at least 1170 and upload them to slider. They will appear as a “full” width slides, like i show on effect image at the bottom of this article. After upload new slides – don’t forget to Enable them <img class='wp-smiley' alt=':)' src='http://paceinfonet.org/wp-includes/images/smilies/icon_smile.gif'/></p><br/><p style='text-align: center;'>New slide uploaded to website</p><br/><p style='text-align: center;'><a href='http://paceinfonet.org/wp-content/uploads/2c-upload-new-images-correct-size.jpg'><img src='http://paceinfonet.org/wp-content/uploads/2c-upload-new-images-correct-size.jpg' alt='2c-upload-new-images-correct-size' class='aligncenter size-full wp-image-1993'/></a></p><br/><p style='text-align: center;'><strong>effect of our modifications: full width slider in prestashop 1.6</strong></p><br/><p style='text-align: center;'><img src='http://paceinfonet.org/wp-content/uploads/0-slider-full-width-prestashop-1-6.jpg' alt='0-slider-full-width-prestashop-1-6' class='aligncenter size-full wp-image-1994'/></p><br/><p> </p><br/><p> </p><br/> <br/><a href='http://paceinfonet.org/full-width-image-slider-for-your-homepage'>Full width image slider for your homepage</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-64709060738035575942014-05-08T04:49:00.001-07:002014-05-08T04:49:29.636-07:00Disabling Right Mouse Click Using jQuery<p>If you are to disable right click on your web browser, you can use the following piece of code:</p><br/><pre><code><br/>$(document).ready(function(){<br/>$(document).bind("contextmenu",function(e){<br/>return false;<br/>});<br/>});</code></pre><br/><p><strong>Determine Browser</strong></p><br/><p>Suppose you were to determine the browser type of the browser currently in use. You can use the following piece of code to do this:</p><br/><pre><code>$(document).ready(function() {<br/>// If the browser type if Mozilla Firefox<br/>if ($.browser.mozilla && $.browser.version >= "1.8" ){ <br/>// some code<br/>}<br/>// If the browser type is Opera<br/>if( $.browser.opera)<br/>{<br/>// some code<br/>}<br/>// If the web browser type is Safari<br/>if( $.browser.safari )<br/>{<br/>// some code<br/>}<br/>// If the web browser type is Chrome<br/>if( $.browser.chrome)<br/>{<br/>// some code<br/>}<br/>// If the web browser type is Internet Explorer<br/>if ($.browser.msie && $.browser.version 6)<br/>{<br/>// some code<br/>}<br/>});</code></pre><br/> <br/><a href='http://paceinfonet.org/disabling-right-mouse-click-using-jquery'>Disabling Right Mouse Click Using jQuery</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-56735637511211941732014-04-15T04:50:00.001-07:002014-04-15T04:50:38.339-07:00save images into database using base64encoding<p>In this tutorial tip let us check how can we save images into database using base64encoding. Usually we will upload an image into the server and keep the image file name into the database, and use that image file name if we want to use that image right?. Yea but here what I’m going to show is how can we save the image itself into the database.</p><br/><p>For that Let us create a database table.</p><br/><pre><code><br/>CREATE TABLE `test`.`user_pic` (<br/>`id`<br/>INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,<br/>`img` LONGTEXT NOT NULL ,<br/>`type` VARCHAR( 10 ) NOT NULL<br/>) ENGINE = MYISAM ;<br/></code></pre><br/><p>So we are using this table for saving the image.<br/><br/>the next part is the image upload part.</p><br/><div><br/><div><code><?php</code></div><br/><div/><br/><div><br/><code>$hostname</code> <code>= </code><code>'localhost'</code><code>;</code><br/></div><br/><div><br/><code>$dbname</code> <code>= </code><code>'test'</code><code>;</code><br/></div><br/><div><br/><code>$db_user</code> <code>= </code><code>'root'</code><code>;</code><br/></div><br/><div><br/><code>$db_password</code> <code>= </code><code>''</code><code>;</code><br/></div><br/><div><br/><code>$link</code> <code>= mysql_connect(</code><code>$hostname</code><code>,</code><code>$db_user</code><code>,</code><code>$db_password</code><code>);</code><br/></div><br/><div><br/><code>$connect</code> <code>= mysql_select_db(</code><code>$dbname</code><code>,</code><code>$link</code><code>)</code><code>or</code> <code>die</code><code>(mysql_error());</code><br/></div><br/><div/><br/><div><br/><code>if</code><code>(isset(</code><code>$_FILES</code><code>[</code><code>'file'</code><code>])){</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$allowed_file_type</code> <code>= </code><code>array</code><code>(</code><code>"jpg"</code><code>, </code><code>"jpeg"</code><code>, </code><code>"png"</code><code>, </code><code>"gif"</code><code>);</code><br/></div><br/><div><br/><code> </code><code>$max_file_size</code> <code>= 524288;</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$file_dir</code><code>=</code><code>"uploads"</code><code>;</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$file_name</code> <code>= </code><code>$_FILES</code><code>[</code><code>'file'</code><code>][</code><code>'name'</code><code>];</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$file_size</code> <code>=</code><code>$_FILES</code><code>[</code><code>'file'</code><code>][</code><code>'size'</code><code>];</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$file_tmp_name</code> <code>=</code><code>$_FILES</code><code>[</code><code>'file'</code><code>][</code><code>'tmp_name'</code><code>];</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$file_type</code><code>=</code><code>$_FILES</code><code>[</code><code>'file'</code><code>][</code><code>'type'</code><code>];</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$ext</code> <code>= </code><code>pathinfo</code><code>(</code><code>$file_name</code><code>, PATHINFO_EXTENSION);</code><br/></div><br/><div/><br/><div><br/><code> </code><code>if</code> <code>(in_array(</code><code>$ext</code><code>, </code><code>$allowed_file_type</code><code>)) {</code><br/></div><br/><div/><br/><div><br/><code> </code><code>if</code><code>(</code><code>$file_size</code> <code>> </code><code>$max_file_size</code><code>){</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$fsize</code><code>=</code><code>$max_file_size</code><code>/1048576;</code><br/></div><br/><div><br/><code> </code><code>echo</code> <code>'File size must be less than '</code><code>.</code><code>$fsize</code><code>.</code><code>' MB'</code><code>;</code><br/></div><br/><div><br/><code> </code><code>break</code><code>;</code><br/></div><br/><div/><br/><div><br/><code> </code><code>}</code><br/></div><br/><div/><br/><div><br/><code> </code><code>$str</code> <code>= </code><code>file_get_contents</code><code>(</code><code>$file_tmp_name</code><code>);</code><br/></div><br/><div><br/><code> </code><code>$b64img</code><code>=</code><code>base64_encode</code><code>(</code><code>$str</code><code>);</code><br/></div><br/><div><br/><code> </code><code>$sql</code><code>=</code><code>"INSERT INTO `user_pic` (`img` ,`type`)VALUES ('$b64img', '$ext')"</code><code>;</code><br/></div><br/><div><br/><code> </code><code>mysql_query(</code><code>$sql</code><code>);</code><br/></div><br/><div/><br/><div><br/><code> </code><code>}</code><br/></div><br/><div/><br/><div><code>}</code></div><br/><div/><br/><div><code>?></code></div><br/><div><br/><code><form action=</code><code>""</code> <code>enctype=</code><code>"multipart/form-data"</code> <code>method=</code><code>"POST"</code><code>>Choose a file to upload : <input type=</code><code>"file"</code> <code>multiple=</code><code>"multiple"</code> <code>name=</code><code>"file"</code> <code>/></code><br/></div><br/><div><br/><code> </code><code><input type=</code><code>"submit"</code> <code>/></form></code><br/></div><br/><p><br/></p><br/><div>So by using this code you can easly upload an image into the database.</div><br/><p><br/></p><br/><div><br/><div><br/><code>$str</code> <code>= </code><code>file_get_contents</code><code>(</code><code>$file_tmp_name</code><code>);</code><br/></div><br/><p><code>$b64img</code><code>=</code><code>base64_encode</code><code>(</code><code>$str</code><code>);</code></p><br/></div><br/></div><br/><p>This code is doing the image encoding part. This line of code first read image file then convert it into base64_encode.<br/><br/>If you don’t want to encode it to base64_encode you can remove this line of code.</p><br/><p>if you want to get the image from database use this code.</p><br/><div><br/><div><br/><code>$hostname</code> <code>= </code><code>'localhost'</code><code>;</code><br/></div><br/><div><br/><code>$dbname</code> <code>= </code><code>'test'</code><code>;</code><br/></div><br/><div><br/><code>$db_user</code> <code>= </code><code>'root'</code><code>;</code><br/></div><br/><div><br/><code>$db_password</code> <code>= </code><code>''</code><code>;</code><br/></div><br/><div><br/><code>$link</code> <code>= mysql_connect(</code><code>$hostname</code><code>,</code><code>$db_user</code><code>,</code><code>$db_password</code><code>);</code><br/></div><br/><div><br/><code>$connect</code> <code>= mysql_select_db(</code><code>$dbname</code><code>,</code><code>$link</code><code>)</code><code>or</code> <code>die</code><code>(mysql_error());</code><br/></div><br/><div><br/><code>$sql</code><code>=</code><code>"SELECT * FROM `user_pic` WHERE `id`=5"</code><code>;</code><br/></div><br/><div><br/><code>$res</code><code>=mysql_query(</code><code>$sql</code><code>);</code><br/></div><br/><div><br/><code>$data</code><code>=mysql_fetch_assoc(</code><code>$res</code><code>);</code><br/></div><br/><div><br/><code>$image</code><code>= </code><code>$data</code><code>[</code><code>'img'</code><code>];</code><br/></div><br/><div><br/><code>$image_type</code><code>= </code><code>$data</code><code>[</code><code>'type'</code><code>];</code><br/></div><br/><div><br/><code>$res</code><code>=</code><code>base64_decode</code><code>(</code><code>$image</code><code>);</code><br/></div><br/><div><br/><code>header(</code><code>"Content-type:image/$image_type"</code><code>);</code><br/></div><br/><p><br/></p><br/><div>So using this simple technique you can easily save images into database using base64encoding. <img class='wp-smiley' alt=';)' src='http://paceinfonet.org/wp-includes/images/smilies/icon_wink.gif'/><br/></div><br/></div><br/> <br/><a href='http://paceinfonet.org/save-images-into-database-using-base64encoding/'>save images into database using base64encoding</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-9847234427215890652014-03-24T21:44:00.001-07:002014-03-24T21:44:29.581-07:00PHP Training in Vadodara<p><strong>Why PHP ?</strong></p><br/><p>php web development due to its increasing advantages, its demand is growing in web development field. It is essential that business developers are aware of PHP development to realize their choices better. Along with Linux and MySQL the technology has appeared as one of the most helpful and free web programming platforms. Whether you need a simple website or a mighty database in the backend, a forum location or a client amicable content administration scheme, PHP offers you everything and that are free, except for charges of PHP developers. If a business unit requests a complete and purposeful website for lesser value then PHP Web development is the eventual choice.</p><br/><p>The IT experts at Paceinfonet Web Solution Pvt Ltd have extensive experience and knowledge of LAMP | WAMP technologies and other open source software, and can quickly built web and batch processing applications in the areas of Content Management Systems, e-Commerce, Business Directoies, Forums, Marketing, Sales and Workflow Systems, Transport and many others.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/php_mysql.jpg' alt='PHP Training in Vadodara' class='aligncenter size-full wp-image-1960'/></p><br/><p><strong>PHP MySql Training in Vadodara</strong></p><br/><p>PHP, a opensource powerful tool for making dynamic and interactive Web pages, is the widely-used, free and efficient alternative to competitors such as Microsoft’s ASP .Net</p><br/><p><b>Why PHP Live training at Paceinfonet Web Solution Pvt Ltd – Vadodara ?</b></p><br/><p>The professional PHP training can’t provide by an institute. You can get it by an IT Company only.</p><br/><p>Paceinfonet Web Solution Pvt Ltd have many satisfied clients with PHP and MySql web application development. Please check few of our latest websites developed using PHP, MySQL, Prestashop and WordPress.</p><br/><p>We have designed special PHP course with practical knowledge of dynamic website creation jobs. Here you will learn about PHP in a very simple way, and how to execute scripts on your server.</p><br/><p>PHP & MySQL are two of the most popular open source technologies to emerge during the past decade. PHP is a powerful language for writing server-side Web applications. MySQL is the world’s most popular open source database. Together, these two technologies provide you a powerful platform for building database-driven Web applications.</p><br/><p>PHP & MySQL training course in Vadodara by IT Company. Our Expert Developer teach you everything they need to build data-driven Web sites using PHP & MySQL successfully.</p><br/><p><strong>WordPress Training in Vadodara</strong></p><br/><p>WordPress is web software you can use to create a beautiful website. It’s both free and priceless at the same time.</p><br/><p><strong>Ecommerce (Prestashop) Training in Vadodara</strong></p><br/><p>Prestashop is web software you can use to create a beautiful Ecommerce website. It’s both free and priceless at the same time. Ecommerce website is most demanded in current time. e.g flipkart.</p><br/><p><strong> For Further Information Please email us on vadodara@paceinfonet.com Or call us on 0265 3006513</strong></p><br/> <br/><a href='http://paceinfonet.org/php-training-in-vadodara/'>PHP Training in Vadodara</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-60486905364005709412014-03-24T05:16:00.001-07:002014-03-24T05:16:17.169-07:00Final Year Project training in vadodara<p>“Paceinfonet Web Solution Pvt Ltd” is pioneer in providing the <strong>Software Training,Corporate Training,Web Development,Web Based Softwares and Web Hosting</strong>.</p><br/><p>The ” Paceinfonet Web Solution Pvt Ltd ” is an acknowledged leader in providing high quality and affordable IT training for companies and individuals in the field, Our accomplished team has expert knowledge and a vast experience of the IT industry; so we can assist you to make the correct decision about the course you need to improve your career choices.<br/><br/>We Share a podium to the students to work with professionals on our Live Projects.</p><br/><p>“Paceinfonet Web Solution Pvt Ltd” Announce <strong>Complete Final Year Training for Final Semester BCA / MCA/ M.sc/BE IT students, We train exclusively PHP & MySQL, Joomla, Ecommerce & WordPress in our Lab.</strong> We gives you Opportunity to work on LIVE Project for Complete Industrial Experience. “We’re recruiting programmers in Our Development Team out of best trainees .” In short Best candidates can have opportunity to get their First Job in our Company while your training.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/training.jpg' alt='Final Year Project training' class='aligncenter size-full wp-image-1955'/></p><br/><p><strong>For Further Information Please email us on vadodara@paceinfonet.com Or call us on 0265 3006513</strong></p><br/> <br/><a href='http://paceinfonet.org/final-year-project-training-in-vadodara/'>Final Year Project training in vadodara</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-66404211438558333942014-03-24T04:51:00.001-07:002014-03-24T04:51:47.491-07:00Only Display Certain Categories in a Menu<p>In many cases, users only want to display certain categories in their navigation menu at the top of the page. There are limited spots, that can only be filled by top categories, but if you use the default wp_list_categories code, it will show all categories. This is why this hack below comes in very handy when you want to create a navigation menu and only display certain categories.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/catmenu.gif' alt='Only Display Certain Categories in a Menu' class='aligncenter size-full wp-image-1950'/></p><br/><p> </p><br/><pre><code><ul style="float:left; width:730px;"><br/><?php wp_list_categories('orderby=name&include=7,9,19,16,1,5,17,23'); ?><br/></ul></code></pre><br/><p>Note, you can also change the ‘include’ text to ‘exclude’ and show all categories and exclude those that you don’t want displayed. The numbers displayed in the code are the category IDs.<br/><br/> Remember since WordPress shows categories in a list format, you will need to edit the CSS in order to make it work.</p><br/> <br/><a href='http://paceinfonet.org/only-display-certain-categories-in-a-menu/'>Only Display Certain Categories in a Menu</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-61078694306500565672014-03-14T03:32:00.001-07:002014-03-14T03:32:54.093-07:00Convert a Menu to a Dropdown<p>How To convert any menu into drop down ? Are You Confuse …..? We see here example how we convert menu to dropdown<br/><br/>We’ll create a dynamic menu that converts to a dropdown when viewed on a small screen.</p><br/><p>In below screen you just see normal menu.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/simplemenu.jpg' alt='simplemenu' class='aligncenter size-full wp-image-1940'/></p><br/><p>If your see it on 960px on your screen resolution you can see.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/dropdownmenu.jpg' alt='dropdownmenu' class='aligncenter size-full wp-image-1941'/></p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/dropdownmenu1.jpg' alt='dropdownmenu1' class='aligncenter size-full wp-image-1942'/></p><br/><p> </p><br/><p>Here we attached sample code that how it was work….Also if you understand that code you know how responsive site work</p><br/><p><a target='_black' href='http://paceinfonet.org/wp-content/uploads/ConvertMenuToDropdown.zip'>Download Sample Code</a></p><br/><p><strong>Thank You………</strong> <img class='wp-smiley' alt=';)' src='http://paceinfonet.org/wp-includes/images/smilies/icon_wink.gif'/></p><br/> <br/><a href='http://paceinfonet.org/convert-a-menu-to-a-dropdown/'>Convert a Menu to a Dropdown</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-11431856168226053092014-03-14T03:11:00.001-07:002014-03-14T03:11:01.552-07:00jQuery Map Marker Plugin<p>jQuery Map Marker Plugin makes it easy to put multiple markers on Map using Google Map API V3.<br/><br/>Map Marker is very useful when you have a list of data & you want to show all of them on Map too.</p><br/><p>Like most of the jQuery plugins, this plugin is very straight forward to setup.<br/><br/>It has some nice options & uses JSON formatted data for every Locations.</p><br/><p>Also make note that you must have to pass the Location values using Lattitude & Longitude co-ordinates of the that Location (due to Google map API limitation).</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/mapmarker-e1375162824274.jpg' alt='mapmarker-e1375162824274' class='aligncenter size-full wp-image-1935'/></p><br/><p>Below steps will make more sense of using this plugin.</p><br/><p><strong>Step-1 :</strong> Include necessary JS files in your <strong><head></strong> tag</p><br/><pre><code><script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script><script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script><br/><br/><script type="text/javascript" src="js/mapmarker.jquery.js"></script></code></pre><br/><p><strong>Step-2 :</strong> Create a Map container using divtag & give it an ID in your html body</p><br/><pre><code><div id="map" style="width: 550px; height: 450px; border: 2px solid red;"></div></code></pre><br/><p><strong>Step-3 :</strong> Apply the Plugin to the Map element using below code. Put the code before closing <strong></head></strong>tag</p><br/><pre><code><br/><script type="text/javascript">// <![CDATA[<br/>$(document).ready(function(){<br/><br/>//set up markers<br/>var myMarkers = {"markers": [<br/>{"latitude": "31.42866311735861", "longitude":"-98.61328125", "icon": "img/house.png", "baloon_text": 'This is <strong>Texas</strong>'},<br/>{"latitude": "35.101934057246055", "longitude":"-96.6796875", "icon": "img/castle.png", "baloon_text": 'This is <strong>Oklahoma</strong>'},<br/>{"latitude": "38.61687046392973", "longitude":"-98.876953125", "icon": "img/house.png", "baloon_text": 'This is <strong>Kansas</strong>'}<br/>]<br/>};<br/><br/>//set up map options<br/>$("#map").mapmarker({<br/>zoom : 5,<br/>center : 'United States',<br/>markers : myMarkers<br/>});<br/><br/>});<br/>// ]]></script></code></pre><br/><p><strong> Each locations will include 4 entities.</strong><br/><br/>1. latitude – latitude of the location<br/><br/>2. longitude – longitude of the location<br/><br/>3. icon – a custom icon to display on map as marker (16 x 16 pixels size)<br/><br/>4. baloon_text – a Text to display in a Baloon on map when clicked on that specific Marker. You can also use this text in HTML format. Make sure you use single quotes(‘) only for HTML format baloon text.</p><br/><p>Use below link if you want to get latitude & longitude<br/><a target='_blank' href='http://www.findlatitudeandlongitude.com/find-address-from-latitude-and-longitude.php'>http://www.findlatitudeandlongitude.com/find-address-from-latitude-and-longitude.php</a></p><br/><p>Additionally, there are 2 more options which you can set on Map.<br/><br/>1. zoom – to set default zoom level of the Map. Increase the value to zoom-in & Decrease the value to zoom-out<br/><br/>2. center – to specify the center location of the Map. Make sure the center location address you enter is spelled properly.<br/><br/>3. markers – this will be simply the Markers variable we created, here it is “myMarkers”</p><br/><p><strong>Step-4</strong> : That’s All</p><br/><p>Enjoy………………!!</p><br/><p>Demo and Download code go to below site</p><br/><p><strong>http://www.welancers.com/jquery-map-marker-plugin/</strong></p><br/> <br/><a href='http://paceinfonet.org/jquery-map-marker-plugin/'>jQuery Map Marker Plugin</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-35810528375443290322014-02-22T01:12:00.001-08:002014-02-22T01:12:33.810-08:00Best IT Comapny in Vadodara<p><strong>Pace Infonet Web Solutions Pvt. Ltd.</strong> is a brand in premium IT solutions in All over the World. <strong>Pace Infonet Web Solutions Pvt. Ltd.</strong> is a leading IT Company in Vadodara.</p><br/><p>provider with its leading presence in verticals like IT Training, Web Development & Web Hosting. The company was started in year 2007 with a vision to provide premium high quality services and since then it has succeeded to do so with 1000′s of satisfied clients and end-users.</p><br/><p> </p><br/><p>With the vast industry experience gained over the years, the company has diversified and not only accumulated it but also distributed its skills & knowledge in form its IT Training vertical. The company always looks forward to contribute to the growth of the industry by offering high quality products as well as skilled workforce.</p><br/><p> </p><br/><ul><br/><li><strong>Web Designing</strong></li><br/><li><strong>Web Development</strong></li><br/><li><strong>Web Hosting</strong></li><br/><li><strong>Domain Names</strong></li><br/><li><strong>Ecommerce Development</strong></li><br/><li><strong>Web Maintenance</strong></li><br/><li><strong>Mobile Development</strong></li><br/><li><strong>Outsourcing</strong></li><br/><li><strong>SEO</strong></li><br/><li><strong>PHP Training</strong></li><br/><li><strong>ASP.Net Training</strong></li><br/><li><strong>Last Sem Project Guidance (BCA, MCA, B.E, Msc. IT)</strong></li><br/></ul><br/><br/><a href='http://paceinfonet.org/best-it-comapny-in-vadodara/'>Best IT Comapny in Vadodara</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-70326328176016702652014-02-18T04:18:00.001-08:002014-02-18T04:18:30.660-08:00dot net and asp dotnet interview questions<p>Welcome to <b>.Net</b> Interview Questions area. These questions are designed to provide a better understanding of Microsoft technologies such as .Net environment, .Net Framework , vb.net , c# , asp.net , sql server etc. Take time to review the common interview questions you will most likely to be asked. These Questions will often link to more detailed information.</p><br/><p> </p><br/><p><b> .Net Environment – Interview Questions</b></p><br/><ul><br/><li>Difference between a Debug and Release build</li><br/><li>Difference between normal DLL and .Net DLL</li><br/><li>What is an Interface</li><br/><li>Difference between Abstract Class and Interface</li><br/><li>Difference between a thread and a process</li><br/><li>What is .Net Delegates</li><br/><li>Differences between a control and a component</li><br/><li>Differences between Stack and Heap</li><br/><li>What is .Net Reflection</li><br/><li>Globalization and Localization</li><br/><li>What is .Net serialization</li><br/><li>Difference between web service and .net remoting</li><br/><li>Difference between managed and unmanaged code</li><br/><li>Difference between Shallow copy and Deep copy</li><br/><li>Use of System.Environment Class</li><br/></ul><br/><p> </p><br/><p><b>ADO.Net – Interview Questions</b></p><br/><ul><br/><li>What are the advantage of ADO.Net</li><br/><li>Differences between classic ADO and ADO.NET</li><br/><li>What are managed providers</li><br/><li>difference between Dataset and DataReader</li><br/><li>How to ADO.Net Connection Pooling</li><br/><li>How to Transaction in ADO.NET</li><br/><li>What is ADO.Net Locking</li><br/><li>Difference between SqlCommand and SqlCommandBuilder</li><br/><li>Difference between Typed DataSets and UnTyped DataSets</li><br/></ul><br/><p> </p><br/><p><b>.Net Framework – Interview Questions</b></p><br/><ul><br/><li>Difference between NameSpace and Assembly</li><br/><li>Execution process for managed code</li><br/><li>What is an Asssembly Qualified Name</li><br/><li>How to Assembly versioning</li><br/><li>Add and remove an assembly from GAC</li><br/><li>What is Native Image Generator (Ngen.exe)?</li><br/><li>How to force Garbage Collection</li><br/><li>Difference between CType and DirectCast</li><br/><li>Obsolete or Deprecated in NET Framework</li><br/><li>What is lazy initialization</li><br/><li>Difference between Clone and Copy</li><br/><li>Difference between Finalize() and Dispose()</li><br/><li>Difference between static and constant</li><br/></ul><br/><p><b> </b></p><br/><p><b> .Net General – Interview Questions</b></p><br/><ul><br/><li>Difference between a Value Type and a Reference Type</li><br/><li>System level Exceptions Vs Application level Exceptions</li><br/><li>Difference between sub-procedure and function</li><br/><li>What does the term immutable mean</li><br/><li>What does the keyword static mean</li><br/><li>this.close() Vs Application.Exit()</li><br/><li>Difference between a.Equals(b) and a == b</li><br/><li>Difference between Hashtable and Dictionary</li><br/><li>Difference between Exception and Error</li><br/><li>C# Dictionary Versus List Lookup Time</li><br/><li>Difference between the Class and Interface in C#</li><br/></ul><br/><p> </p><br/><p><b>Asp.Net – Interview Questions</b></p><br/><ul><br/><li>What is IIS – Internet Information Server</li><br/><li>What is Virtual Directory</li><br/><li>What is HttpHandler</li><br/><li>Page Directives in Asp.Net</li><br/><li>What is a postback</li><br/><li>What is IsPostBack</li><br/><li>What is global.asax</li><br/><li>Difference between Machine.config and web.config</li><br/><li>Difference between HTML control and Web Server control</li><br/><li>What is Query String</li><br/><li>Difference between Authentication and Authorization</li><br/><li>How to secure Connection Strings</li><br/><li>What is ASP.Net tracing</li><br/><li>Passing values between Asp.Net pages</li><br/><li>Differentiate between client side validation and server side validation</li><br/></ul><br/><br/><a href='http://paceinfonet.org/dotnet-and-asp-dotnet-interview-questions/'>dot net and asp dotnet interview questions</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-77341622103948708522014-02-14T00:54:00.001-08:002014-02-14T00:54:45.082-08:00Best Web Hosting Service in India<p>In web hosting industry, India is a vast market. So that we see many popular hosting companies set branches and support centers in this stream. With it’s powerful IT technologies, India also manages the second largest internet user country in the world. If you are an Indian customer and planning to host your business site on Indian hosting server but not sure which service to go, we’ll provide some guidance on how to choose the right Hosting service provider.</p><br/><p><em><strong>How to find the best web hosting Service in India or USA?</strong></em></p><br/><p><strong>Best hosting services</strong> has become major important aspect these days to bring your business website online or world wide web and make visible to everyone globally. Suppose if you go to Google and you search for the best hosting services in India, plenty of hosting websites will be displayed and therefor you are sure which one to Hire.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/web_hosting_services_india.png' alt='web_hosting_services_india' class='alignleft size-full wp-image-1919'/><img src='http://paceinfonet.org/wp-content/uploads/Web-hosting-domain-services.jpg' alt='Web-hosting-domain-services' class='alignleft size-full wp-image-1920'/></p><br/><p>All web hosting companies in India or USA offers a hosting server where you can store your business sites and create them available on the internet. Some do it better than others. The best and top providers give quality Hosting services great assistance and offer a variety of functions. However some are not.</p><br/><p>An industry of web hosting market sometimes encourages for free services. Keep in mind the fact that you only get what you pay for. And there no folks provide you good services for FREE. Also, you should keep in mind that Pay the very lowest and what would you get? Off course very lowest in features, support, services and assistance.</p><br/><p><em><strong>Do Check if the Hosting Website go slow/Offline Often</strong></em></p><br/><p>Keep in mind that your web host should provide 99.9 % Server Up time Because, it may be possible that you may loose all traffic If your business web site go offline. Hence, you should make sure that your web Host should have 99.9% Server Up time.</p><br/><p>When you are in search of a Best hosting services in India take some time to analysis the newest specialized improvements and see what the best serves are providing. The best are not actually expensive; actually they are competitive for your hosting consideration.</p><br/><p>There are lot of web hosting sites provide free web host but of course the advantages are restricted. There are a lot of sites that provide best hosting service at a little cost and come with more advantages. This would be more better than the previous one.</p><br/><p style='text-align: left;'><strong>About</strong> <strong>Paceinfonet Web Solution Pvt Ltd</strong><br/><br/>We are a fast growing Web Development & Web Hosting company in India working in the industry since last 7 years. We have very high project completion rate and have executed websites which stand out and give our clients a competitive edge. With hundreds of eye-catching websites under our belt. We specialize in E-commerce & Custom websites, Joomla, WordPress, any and all PHP based Opensource platforms.</p><br/><p>Please check our Web hosting and development services at -</p><br/><p><a target='_blank' href='http://paceinfonet.org'><strong>www.paceinfonet.org</strong></a><br/><a target='_blank' href='http://paceinfonetwebdesigningstudio.com'><strong>www.paceinfonetwebdesigningstudio.com</strong></a><br/><a target='_blank' href='http://paceinfonet.com'><strong>www.paceinfonet.com</strong></a></p><br/><p><strong>You can get More information about Hosting and Domain @ <a href='http://www.paceinfonet.com'>http://www.paceinfonet.com</a></strong></p><br/> <br/><a href='http://paceinfonet.org/best-web-hosting-service-in-india/'>Best Web Hosting Service in India</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-71312944273179963092014-01-25T01:26:00.001-08:002014-01-25T01:26:42.852-08:00rich password widget for your web forms<p>Here is a password field widget that not only has a password strength meter but also has other essential features that your users would love to have.</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/password-widget-1.png' alt='password-widget-1' class='aligncenter size-full wp-image-1911'/></p><br/><p><strong>Mask or unmask? Do passwords really have to look like **** ?</strong></p><br/><p>When you type-in your password, the password field shows a mask. This mask supposedly prevents someone from observing your screen ‘over the shoulder’ .</p><br/><p><img src='http://paceinfonet.org/wp-content/uploads/password-widget-2.png' alt='password-widget-2' class='aligncenter size-full wp-image-1912'/><strong>Need a strong password quickly? Generate it.</strong></p><br/><p>For those users, it will just be good to generate a password for the web site and then let the password manager remember it for life. Having a password generator along with the password field will be handy.</p><br/><p><strong>Download</strong></p><br/><p><a href='http://paceinfonet.org/wp-content/uploads/PasswordWidget.zip'>PasswordWidget</a></p><br/><p><strong>Usage</strong><br/><br/>The usage is simple.<br/><br/>First, link to the style sheet and the JavaScript file:</p><br/><pre><code><br/><link rel="STYLESHEET" type="text/css" href="pwdwidget.css" /><br/><script src="pwdwidget.js" type="text/javascript"></script></code></pre><br/><p>Instead of the password field, use the code below.</p><br/><pre><code><br/><label for='regpwd'>Password:</label> <br /><br/><div class='pwdwidgetdiv' id='thepwddiv'></div><br/><script type="text/javascript" ><br/>var pwdwidget = new PasswordWidget('thepwddiv','regpwd');<br/>pwdwidget.MakePWDWidget();<br/></script><br/><noscript><br/><div><input type='password' id='regpwd' name='regpwd' /></div><br/></noscript></code></pre><br/><p>Notice that noscript part makes sure that a normal password field is shown even if Java Script is disabled.</p><br/><p>The parameters to the PasswordWidget() class are: (1)the ID of the div for the widget and (2)the name of the password field.</p><br/><pre><code><br/>var pwdwidget = new PasswordWidget(id_of_div,name_of_passwordfield);<br/></code></pre><br/><p><strong>More options</strong></p><br/><p>The features can be turned on/off. For example, it doesn’t make sense to have a ‘generate’ option in a log-in form. Here is the code:</p><br/><pre><code>var pwdwidget = new PasswordWidget('thepwddiv','regpwd');<br/>pwdwidget.enableGenerate=false;<br/>pwdwidget.enableShowStrength=false;<br/>pwdwidget.MakePWDWidget();</code></pre><br/><p>Similarly, you can modify/translate the label text :</p><br/><pre><code>var pwdwidget = new PasswordWidget('thepwddiv','regpwd');<br/>pwdwidget.txtShow= 'Display';<br/>pwdwidget.txtMask= 'Hide';<br/>pwdwidget.MakePWDWidget();<br/></code></pre><br/> <br/><a href='http://paceinfonet.org/rich-password-widget-for-your-web-forms/'>rich password widget for your web forms </a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-36093421525085871702013-12-23T20:44:00.001-08:002013-12-23T20:44:55.236-08:00Cleaning Variable<p>Variables that are submitted via web forms always need to be cleaned/sanitized before use in any way, to prevent against all kinds of different malicious intent.</p><br/><p>FUNCTION</p><br/><pre><code><br/>function clean($value) {<br/><br/>// If magic quotes not turned on add slashes.<br/>if(!get_magic_quotes_gpc())<br/><br/>// Adds the slashes.<br/>{ $value = addslashes($value); }<br/><br/>// Strip any tags from the value.<br/>$value = strip_tags($value);<br/><br/>// Return the value out of the function.<br/>return $value;<br/><br/>}<br/></code></pre><br/><p>PHP CODE</p><br/><pre><code>$sample = "<a href='#'>test</a>";<br/>$sample = clean($sample);<br/>echo $sample;</code></pre><br/> <br/><a href='http://paceinfonet.org/cleaning-variable/'>Cleaning Variable</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-13522394409854033682013-12-17T20:39:00.001-08:002013-12-17T20:39:57.202-08:00HTML5 Page Structure<pre><code><!DOCTYPE HTML><br/><br/><html><br/><br/><head><br/><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><br/><title>Your Website</title><br/></head><br/><br/><body><br/><br/><header><br/><nav><br/><ul><br/><li>Your menu</li><br/></ul><br/></nav><br/></header><br/><br/><section><br/><br/><article><br/><header><br/><h2>Article title</h2><br/><p>Posted on <time datetime="2009-09-04T16:31:24+02:00">September 4th 2009</time> by <a href="#">Author Name</a> - <a href="#comments">6 comments</a></p><br/></header><br/><p>Your Content Goes Here.</p><br/></article><br/><br/><article><br/><header><br/><h2>Article title</h2><br/><p>Posted on <time datetime="2009-09-04T16:31:24+02:00">September 4th 2009</time> by <a href="#">Author Name</a> - <a href="#comments">6 comments</a></p><br/></header><br/><p>Your Content Goes Here.</p><br/></article><br/><br/></section><br/><br/><aside><br/><h2>About section</h2><br/><p>Aside Content Goes Here.</p><br/></aside><br/><br/><footer><br/><p>Copyright 2013 Your Company Name</p><br/></footer><br/><br/></body><br/><br/></html></code></pre><br/> <br/><a href='http://paceinfonet.org/html5-page-structure/'>HTML5 Page Structure</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-80000536090909222312013-12-17T20:34:00.001-08:002013-12-17T20:34:24.260-08:00Hides iframe until fully loaded<pre><code><iframe style="visibility: hidden;" src="yourhtmlpagepath.html" width="320"></iframe></code></pre><br/> <br/><a href='http://paceinfonet.org/hides-iframe-until-fully-loaded/'>Hides iframe until fully loaded</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-34752840831498305242013-12-13T21:15:00.001-08:002013-12-13T21:15:59.236-08:00Php Interview Questions and Answers<p><strong>1- How can we register the variables into a session?</strong><br/><br/>session_register($session_var);</p><br/><p>$_SESSION['var'] = ‘value’;<br/><strong>2- What is the difference between characters \023 and \x23?</strong><br/><br/>The first one is octal 23, the second is hex 23.<br/><strong>With a heredoc syntax, do I get variable substitution inside the heredoc contents?</strong><br/><br/>Yes.<br/><strong>3- How can we submit form without a submit button?</strong><br/><br/>We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we can call the document.form.submit() function to submit the form. For example: <input type=button value=”Save” onClick=”document.form.submit()”><br/><strong>4- How can we create a database using PHP and mysql?</strong><br/><br/>We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.<br/><strong>5- How many ways we can retrieve the date in result set of mysql using php?</strong><br/><br/>As individual objects so single record or as a set or arrays.<br/><strong>6- Can we use include (“abc.php”) two times in a php page “makeit.php”?</strong><br/><br/>Yes.<br/><strong>7- For printing out strings, there are echo, print and printf. Explain the differences.</strong><br/><br/>echo is the most primitive of them, and just outputs the contents following the construct to the screen. print is also a construct (so parentheses are optional when calling it), but it returns TRUE on successful output and FALSE if it was unable to print out the string. However, you can pass multiple parameters to echo, like:</p><br/><p><?php echo ‘Welcome ‘, ‘to’, ‘ ‘, ‘techpreparations!’; ?></p><br/><p>and it will output the string “Welcome to techpreparations!” print does not take multiple parameters. It is also generally argued that echo is faster, but usually the speed advantage is negligible, and might not be there for future versions of PHP. printf is a function, not a construct, and allows such advantages as formatted output, but it’s the slowest way to print out data out of echo, print and printf.<br/><strong>8- I am writing an application in PHP that outputs a printable version of driving directions. It contains some long sentences, and I am a neat freak, and would like to make sure that no line exceeds 50 characters. How do I accomplish that with PHP?</strong><br/><br/>On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().<br/><strong>9- What’s the output of the ucwords function in this example?</strong><br/><br/>$formatted = ucwords(“TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS”);</p><br/><p>print $formatted;</p><br/><p>What will be printed is TECHPREPARATIONS IS COLLECTION OF INTERVIEW QUESTIONS.</p><br/><p>ucwords() makes every first letter of every word capital, but it does not lower-case anything else. To avoid this, and get a properly formatted string, it’s worth using strtolower() first.<br/><strong>10- What’s the difference between htmlentities() and htmlspecialchars()?</strong><br/><br/>htmlspecialchars only takes care of <, >, single quote ‘, double quote ” and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.<br/><strong>11- How can we extract string “abc.com” from a string “mailto:info@abc.com?subject=Feedback” using regular expression of PHP?</strong><br/><br/>$text = “mailto:info@abc.com?subject=Feedback”;</p><br/><p>preg_match(‘|.*@([^?]*)|’, $text, $output);</p><br/><p>echo $output[1];</p><br/><p>Note that the second index of $output, $output[1], gives the match, not the first one, $output[0].<br/><strong>12- So if md5() generates the most secure hash, why would you ever use the less secure crc32() and sha1()?</strong><br/><br/>Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.</p><br/> <br/><a href='http://paceinfonet.org/php-interview-questions-and-answers/'>Php Interview Questions and Answers</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-29317507891020829822013-12-03T20:47:00.001-08:002013-12-03T20:47:59.754-08:00ASP.NET Ajax UpdateProgress<p>UpdateProgress control shows the status information for the progress of the download occurring during the partial-page rendering in the UpdatePanel. The page can contain multiple UpdateProgress controls. Each one can be associated with a different UpdatePanel control. Alternatively, you can use one UpdateProgress control and associate it with all the UpdatePanel controls on the page. You can place UpdateProgress control either inside or outside the UpdatePanel controls. The following Asp.Net program shows how to an UpdateProgress control waits for completion of the task and during this waiting time it shows a .gif file as waiting message. <strong>Default.aspx</strong></p><br/><pre><code><br/><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br/><html xmlns="http://www.w3.org/1999/xhtml"><br/><head id="Head1" runat="server"><br/><title>Untitled Page</title><br/></head><br/><body><br/><form id="form1" runat="server"><br/><div><br/><asp:ScriptManager ID="ScriptManager1" runat="server"><br/></asp:ScriptManager><br/><asp:UpdateProgress ID="UpdateProgress1" runat="server"><br/><ProgressTemplate><br/><img alt="ajax-progress" src="http://asp.net-informations.com/ajax/img/ajax-progress.gif"></img><br/></ProgressTemplate><br/></asp:UpdateProgress><br/><asp:UpdatePanel ID="UpdatePanel1" runat="server"><br/><ContentTemplate><br/><asp:Label ID="Label1" runat="server" Text=""></asp:Label><br/><br /><br/><asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /><br/></ContentTemplate><br/></asp:UpdatePanel><br/></div><br/></form><br/></body><br/></html></code></pre><br/><p><strong>Default.aspx.cs</strong></p><br/><pre><code><br/>using System;<br/>using System.Web.UI;<br/><br/>public partial class _Default : System.Web.UI.Page<br/>{<br/>protected void Page_Load(object sender, EventArgs e)<br/>{<br/><br/>}<br/>protected void Button1_Click(object sender, EventArgs e)<br/>{<br/>System.Threading.Thread.Sleep(5000);<br/>Label1.Text = "Server Time : " + DateTime.Now.ToString();<br/>}<br/>}</code></pre><br/><p><strong>Default.aspx.vb</strong></p><br/><pre><code><br/>Partial Class _Default<br/>Inherits System.Web.UI.Page<br/><br/>Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click<br/>System.Threading.Thread.Sleep(5000)<br/>Label1.Text = "Server Time : " & DateTime.Now.ToString()<br/>End Sub<br/>End Class</code></pre><br/> <br/><a href='http://paceinfonet.org/asp-net-ajax-updateprogress/'>ASP.NET Ajax UpdateProgress</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-72609885738513049432013-11-20T20:08:00.001-08:002013-11-20T20:08:26.912-08:00Handling drop-down list in a PHP form<p>This tutorial will show you how to add select boxes and multi-select boxes to a form, how to retrieve the input data from them, how to validate the data, and how to take different actions depending on the input.</p><br/><p><strong>Select box</strong></p><br/><p>Let’s look at a new input: a “select” box, also known as a “drop-down” or “pull-down” box. A select box contains one or more “options”. Each option has a “value”, just like other inputs, and also a string of text between the option tags. This means when a user selects “Male”, the “formGender” value when accessed by PHP will be “M”.</p><br/><pre><code><p><br/>Gender :<br/><select name="formGender"><br/><option value="">Select</option><br/><option value="M">Male</option><br/><option value="F">Female</option><br/></select><br/></p></code></pre><br/><p>The selected value from this input was can be read with the standard $_POST array just like a text input and validated to make sure the user selected Male or Female.</p><br/><pre><code><br/><?php<br/><br/>if(isset($_POST['formSubmit']) )<br/>{<br/>$varMovie = $_POST['formMovie'];<br/>$varName = $_POST['formName'];<br/>$varGender = $_POST['formGender'];<br/>$errorMessage = "";<br/>}<br/>?></code></pre><br/><p>It’s always a good idea to have a “blank” option as the first option in your select box. It forces the user to make a conscious selection from the box and avoids a situation where the user might skip over the box without meaning to. Of course, this requires validation.</p><br/><pre><code><br/><?php<br/><br/>if(!isset($_POST['formGender']))<br/>{<br/>$errorMessage .= "<li>You forgot to select your Gender!</li>";<br/>}<br/><br/>?></code></pre><br/> <br/><a href='http://paceinfonet.org/handling-drop-down-list-in-a-php-form/'>Handling drop-down list in a PHP form</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-57960462338219047562013-11-09T00:22:00.001-08:002013-11-09T00:22:03.242-08:00<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dyGLSDGg_ZCSNds40te_7drIkIPR2vgy4OShBWZIyHxEyKdMzLjDqZgKmHwwKJ5fHo8Zm-shLNDaad5ZrrVQw' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
<span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;"><b>Website Developement and PHP, .Net Training, Website Hosting by IT Company in Baroda</b></span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Best IT Company in Vadodara.</span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Provides Web Hosting, Website Development, Website Designing,</span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Live Project Training, PHP Training, .Net Training, WordPress and Ecommerce Training, Last sem Project Guidance for BCA,MCA,BE,Msc IT,Diploma Student.</span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Visit Our Website :-</span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">www.paceinfonet.org</span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">www.paceinfonet.com</span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">502B, 6th Floor, Concorde Bldg., </span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">RC Dutt Road, Alkapuri, </span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Vadodara - 390007, Gujarat ( india ) </span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Phone : 0265 3051919 </span><br style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;" /><span style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px; line-height: 17px;">Mobile : +91 - 8000195514</span></div>
Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-27345209763143667192013-11-07T23:26:00.001-08:002013-11-07T23:26:21.253-08:00jQuery Display Progress Bar on Button Click in Asp dotnet<p>Here I will explain how to use jQuery to show progress bar on button click in asp.net with example in c#, vb.net or jQuery show loading image on button click in asp.net using c#, vb.net.</p><br/><p>To implement this we need to write the code like as shown below in your aspx page</p><br/><pre><code><br/><html xmlns="http://www.w3.org/1999/xhtml"><br/><head id="Head1" runat="server"><br/><title>jQuery show progress bar on button click asp.net</title><br/><script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script><br/><style type="text/css"><br/>.sample<br/>{<br/>background-color:#DC5807;<br/>border:1px solid black;<br/>border-collapse:collapse;<br/>color:White;<br/>}<br/></style><br/></head><br/><body><br/><form id="form1" runat="server"><br/><div id="DisableDiv"> </div><br/><input type="button" id="btnClick" value="Get Data" /><br/><div id="testdiv"></div><br/></form><br/><script type="text/javascript"><br/>$(function() {<br/>$('#btnClick').click(function() {<br/>$('#DisableDiv').fadeTo('slow', .6);<br/>$('#DisableDiv').append('<div style="background-color:#E6E6E6;position: absolute;top:0;left:0;width: 100%;height:300%;z-index:1001;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);"><img src="loading.gif" style="background-color:Aqua;position:fixed; top:40%; left:46%;"/></div>');<br/>setTimeout(function() { GetData() }, 1000)<br/>})<br/>});<br/>function GetData()<br/>{<br/>$.ajax({<br/>type: "POST",<br/>contentType: "application/json; charset=utf-8",<br/>url: "ShowLoadingImageonButtonClick.aspx/BindDatatable",<br/>data: "{}",<br/>dataType: "json",<br/>success: function(data) {<br/>var theHtml = data.d;<br/>$('#testdiv').html(theHtml)<br/>$('#DisableDiv').html("");<br/>},<br/>error: function(result) {<br/>alert("Error");<br/>}<br/>});<br/>}<br/></script><br/></body><br/></html></code></pre><br/><p>Now add following namespaces in code behind</p><br/><p><strong>C# Code<br/></strong></p><br/><pre><code><br/>using System;<br/>using System.Data;<br/>using System.Data.SqlClient;<br/>using System.Web.Services;<br/>using System.Web.UI;<br/>using System.Web.UI.WebControls;<br/><br/>Once we add namespaces need write the code like as shown below<br/><br/> protected void Page_Load(object sender, EventArgs e)<br/>{<br/>}<br/>[WebMethod]<br/>public static string BindDatatable()<br/>{<br/>GridView gv = new GridView();<br/>System.IO.StringWriter stringWriter = new System.IO.StringWriter();<br/>HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);<br/>DataTable dt = new DataTable();<br/>using (SqlConnection con = new SqlConnection("Data Source=SureshDasari;Initial Catalog=MySampleDB;Integrated Security=true"))<br/>{<br/>using (SqlCommand cmd = new SqlCommand("select UserId,UserName,Location from UserInformation", con))<br/>{<br/>con.Open();<br/>SqlDataAdapter da = new SqlDataAdapter(cmd);<br/>da.Fill(dt);<br/>}<br/>}<br/>gv.HeaderStyle.CssClass = "sample";<br/>gv.DataSource = dt;<br/>gv.DataBind();<br/>gv.RenderControl(htmlWriter);<br/>return stringWriter.ToString();<br/>}</code></pre><br/><p><strong>VB.NET Code</strong></p><br/><p> </p><br/><pre><code><br/>Imports System.Data<br/>Imports System.Data.SqlClient<br/>Imports System.Web.Services<br/>Imports System.Web.UI<br/>Imports System.Web.UI.WebControls<br/><br/>Partial Class VBCode<br/>Inherits System.Web.UI.Page<br/>Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)<br/>End Sub<br/><WebMethod()> _<br/>Public Shared Function BindDatatable() As String<br/>Dim gv As New GridView()<br/>Dim stringWriter As New System.IO.StringWriter()<br/>Dim htmlWriter As New HtmlTextWriter(stringWriter)<br/>Dim dt As New DataTable()<br/>Using con As New SqlConnection("Data Source=SureshDasari;Initial Catalog=MySampleDB;Integrated Security=true")<br/>Using cmd As New SqlCommand("select UserId,UserName,Location from UserInformation", con)<br/>con.Open()<br/>Dim da As New SqlDataAdapter(cmd)<br/>da.Fill(dt)<br/>End Using<br/>End Using<br/>gv.HeaderStyle.CssClass = "sample"<br/>gv.DataSource = dt<br/>gv.DataBind()<br/>gv.RenderControl(htmlWriter)<br/>Return stringWriter.ToString()<br/>End Function<br/>End Class<br/></code></pre><br/><p><a href='http://paceinfonet.org/wp-content/uploads/1.jpg'><img src='http://paceinfonet.org/wp-content/uploads/1.jpg' alt='Aspdotnet_jquery1' class='aligncenter size-full wp-image-1863'/></a></p><br/><p><a href='http://paceinfonet.org/wp-content/uploads/21.jpg'><img src='http://paceinfonet.org/wp-content/uploads/21.jpg' alt='aspdotnet_jquery2' class='aligncenter size-full wp-image-1864'/></a></p><br/><p><a href='http://paceinfonet.org/wp-content/uploads/31.jpg'><img src='http://paceinfonet.org/wp-content/uploads/31.jpg' alt='aspdotnet_jquery3' class='aligncenter size-full wp-image-1865'/></a></p><br/> <br/><a href='http://paceinfonet.org/jquery-display-progress-bar-on-button-click-in-asp-dotnet/'>jQuery Display Progress Bar on Button Click in Asp dotnet</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-56445034142201316462013-10-24T21:04:00.001-07:002013-10-24T21:04:27.752-07:00MySql Connection Strings in Ado.Net<p>Today, MySql is open source database in the world. In Ado.net to make connection to MySql , we have different connection strings. Basically it is not easy to remember different database connection strings in Ado.Net. So I am sharing some connection strings to connect to the MySql database using different drivers.</p><br/><p><strong>Using ODBC</strong></p><br/><p>// ODBC — MyODBC Driver — remote database<br/><br/>using System.Data.Odbc;<br/><br/>OdbcConnection conn = new OdbcConnection();<br/><br/>conn.ConnectionString = “Driver={MySql}; Server=db.domain.com; Option=131072; Port=3306; Stmt=; DataBase=DataBaseName; Uid=UserName; Pwd=Secret;” ;<br/><br/>conn.Open();</p><br/><p><strong>Using OLEDB</strong></p><br/><p>// OleDb<br/><br/>using System.Data.OleDb;<br/><br/>OleDbConnection conn = new OleDbConnection();<br/><br/>conn.ConnectionString = “Provider=MySqlProv; Data Source=ServerName; User id=UserName; Password=Secret”;<br/><br/>conn.Open();</p><br/><p><strong>Using .Net DataProvider</strong></p><br/><p>// .NET DataProvider from CoreLab<br/><br/>using CoreLab.MySql;<br/><br/>MySqlConnection conn = new MySqlConnection();<br/><br/>conn.ConnectionString =”Host=ServerName; DataBase=DataBaseName; Protocol=TCP; Port=3306; Direct=true; Compress=false; Pooling=true; Min Pool Size=0; Max Pool Size=100; Connection Lifetime=0;<br/><br/>User id=UserName;Password=Secret”;<br/><br/>conn.Open();</p><br/> <br/><a href='http://paceinfonet.org/mysql-connection-strings-in-ado-net/'>MySql Connection Strings in Ado.Net</a>Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0tag:blogger.com,1999:blog-4669950969420283285.post-20679278619691251162013-10-15T21:43:00.000-07:002013-10-15T21:43:15.115-07:00PHP Project Training In Vadodara<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxbo91iyDBA4MspwMgA5HAP-87SDFoGzKs5S80BBY6N4_yf7jl-SA38B2YmUFBH3N82ZW2ez097DbvUtnbs' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br />
<br />
Website Developement and PHP, .Net Training, Website Hosting by IT Company in Baroda<br />
<br />
Best IT Company in Vadodara.<br />
Provides Web Hosting, Website Development, Website Designing,<br />
Live Project Training, PHP Training, .Net Training, WordPress and Ecommerce Training, Last semester Project Guidance for BCA, MCA, BE, Msc IT, Diploma Student.<br />
<br />
Visit Our Website :-<br />
www.paceinfonet.org<br />
www.paceinfonet.com<br />
<br />
502B, 6th Floor, Concorde Bldg.,<br />
RC Dutt Road, Alkapuri,<br />
Vadodara - 390007, Gujarat ( india )<br />
<br />
Phone : 0265 3051919<br />
Mobile : +91 - 8000195514 </div>
Anonymoushttp://www.blogger.com/profile/08331501820479626345noreply@blogger.com0