This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CTRL+SHIFT+H will open the replace dialogue where you can find+replace in any or all of your open projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jquery part | |
$('#registration_form').on('submit',function(e){ | |
e.preventDefault(); | |
var datastring = $(this).serialize(); | |
$.ajax({ | |
method : "GET", | |
url : "<?php echo base_url(); ?>Main/submit_registration_form", | |
data: {datastring:datastring} | |
}) | |
.done(function(msg){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You must add these two lines just after selecting the database, i.e mysql_select_db() function. | |
mysql_query(‘SET CHARACTER SET utf8’); | |
mysql_query(“SET SESSION collation_connection =’utf8_general_ci'”); | |
After executing these two statements MySQL will handle the rest. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#registration_form').on('submit',function(e){ | |
e.preventDefault(); | |
var datastring = $(this).serialize(); | |
$.ajax({ | |
method : "GET", | |
url : "ajax_registration.php", | |
data: {datastring:datastring} | |
}) | |
.done(function(msg){ | |
$('#registration_alert').css('display','block'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete the .htaccess file from root directory.add new .htaccess file with these codes. | |
RewriteEngine on | |
RewriteCond $1 !^(index\.php|public|\.txt) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?$1 | |
//find the below code | |
$config['index_page'] = "index.php" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set session data | |
$newdata = array( | |
'username' => 'johndoe', | |
'email' => '[email protected]', | |
'logged_in' => TRUE | |
); | |
$this->session->set_userdata($newdata); | |
unset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.One way to get data from database in entity framework to use sql query the syntex is given below : | |
public ActionResult Animals(int id) | |
{ | |
var animals = db.Animals.SqlQuery("select * from dbo.Animals where FoodId =1").ToList(); | |
return View(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIPS : | |
--To add any folder / directory in asp.net mvc project one should not copy and past the directory in the project directly like in php.One must | |
add a folder in the directory manually and the add classes by adding existing item.otherwise the project will not know the folder and there | |
will arise issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NID : 19925917411000133 | |
Birth : 199905917406013044 | |
BICC : https://erecruitment.bcc.gov.bd/exam/dashboard/dashboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Date Picker : | |
1.to embed jquery datepicker firstly add the following jquery files in header part | |
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> | |
<script src="~/Scripts/jquery-3.2.1.js"></script> | |
<script src="~/Scripts/jquery-ui-1.12.1.js"></script> | |
2.<script> | |
$(document).ready(function () { | |
$('#PossibleStartDate').datepicker(); --this is the id field of the datefield | |
$('#PossibleEndDate').datepicker(); | |
$('#PossibleEndDate').on('leave', function () { |