WELCOME TO CYBER WORLD
Educational and Technical contents for everyone who have interest in tech field.
Overload Operators Hacker Rank
How to transfer values to modal
Here is my field from where we want to send values to modal
<a href="<?= '/permissions/edit/'.$permission['id']; ?>">
<button class="btn btn-info btn-icon btn-icon-mini btn-round"><i class="zmdi zmdi-edit">
</i></button></a>
</a>
-------------------------------------It is our modal---------------------------------
<div class="modal fade" id="modal_popup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-sm" role="document">
<form action="<?php echo base_url(); ?>/permissions/status_changed" method="post">
<div class="modal-content">
<div class="modal-header" style="height: 150px;">
<h4 style="margin-top: 50px;text-align: center;">Are you sure, do you change status?</h4>
<input type="hidden" name="id" id="user_id">
<input type="hidden" name="status" id="user_status">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger pull-left" data-dismiss="modal">No</button>
<button type="submit" name="submit" class="btn btn-success">Yes</button>
</div>
</div>
</form>
</div>
</div>
//Our Jquery Code
<script type="text/javascript">
$(function() {
//For Status Update
$(".user_status").on("click", function() {
var firstValue = $(this).data('uid');
//alert(firstValue);
var secondValue = $(this).data('ustatus');
$("#user_id").val(firstValue);
$("#user_status").val(secondValue);
});
});
</script>
Code to insert one value from one input to another
Best tool for web developer (insert whole data in single click in database)
INSERTING DATA IN DATABASE TABLE BECOMES TOO DIFFICULT WHEN WE HAVE LARGE AMOUNT OF DATA . TO KEEP AWAY THIS PROBLEM THERE IS VERY GOOD SOLUTION
GO TO THIS LINKCLICK HERE TO VISIT
GO TO THIS WEBSITE SIMPLY IMPORT WHOLE EXCEL DATA SHEET AND COPY ALL THE QUERIES AND PASTE IT TO CMD MYSQL CONSOLE OR DIRECT PHP MYADMIN QUERY BOX YOU TABLE WILL BE CREATED SIMPLY RENAME IT ACCORDING TO YOUR NEED.
Ajax dropdown city from selected state from database in php free source code
Using ajax to make dropdown when state and city is selected
- First create page where you have embed or add state and city option(example: state_city.php)
- Then create an differente page from where we will receive response when state option is selected
There is three stages create select options for state and city then take data from server(state data) and display as select option as state, when state option is selected then the value inside state dropdown will go to ajax function to send request to other page, where city date is getting then display this page data as html in state page below;
see the source code you will understand completly.
This is ajax block whice receive data from state option
This page is included in main page where we have to display data
This is select option where we have to display state and then from state to city dropdown
This is city_state.php from where we will get date when user select state in main page
DISABLE WINDOWS 10 NEWS SECTION POP UP FROM TASKBAR
HOW TO DISABLE NEWS POPUP WHEN CURSOR GOES THERE BY SOME MISTAKE
- simply right click with mouse on news icon in taskbar
- then there is a option news and interest
- simply go inside menu
- select turn off
- now you news and interest is disables
MAKE OPTIONS IN FORM WITH ALREADY SELECTED DATA
CREAT SELECT OPTION, AND ALSO SHOWING PREVIOUSLY SELECTED OPTION BY USER FROM DATABASE.
SQL: A Realtional Database Language
Sql is the query langugae used with relational databases.Sql is not a DBMS itselflkbut ut us a medum of communication with DBMS.SQL is muvh easiet to understand and lwatn as compared to other language.SQL was initially called SEQUEL was later names as SQL during 1970's. Sql is a set based , declarative set based declarative query language and not imperative language such as c or BASIC. Declarative means that user only need to state" what " needs to be done and not how to be done.DBMS determines tand performs internally the steps needed to accomplis the job. It is also known to be non-procedural language.
Features of Sql
⦁ sql statements are not case senstive(but data is case sensitive)
⦁ sql can be written one or more lines
⦁ clauses are usually placed on separate lines
⦁ Keywords cannot be split across lines
⦁ Tabs and spaces are allowed to enhance readability
⦁ Each SQL statement (not line) wnds with a semicolon(;)
⦁ sql is declarative and non-procedural language.
⦁ Sql statement start with verbs(actions) .Example create command.
⦁ Identifier always start with alphabet ⦁ single line comment are prefixed by - symbol and multiline comments are enclosed between /* and */
MOST USED PHP FUNCTIONS FOR DEVELOPEMENT
USING STRTOTIME() AND DATE() FUNCTION IN PHP
FETCHING DATE YEAR AND TIME SEPARATELY FROM USER INPUT
- WE HAVE STORED DATE IN A VARIABLE NAME $date FROM INPUT BY POST METHOD
- IN SECOND LINE $time IS USED TO STORED CONVERTED DATA WHICH IS CONVERTED INTO STRING BY USING strtotime() FUNCTION THIS FUNCTION CONVERTS DAY, MONTH, YEAR IN TO STRING AND THEN FROM STRING WE CAN FETCH DAY MONTH AND YEAR SEPARATELY
- HERE AN ANOTHER FUNCTION IS USED WHICH IS DATE("SPECIFIER","VARIABLE") IT EXTRACT DATE MONTHS AND YEAR SEPARATELY
- THEN WE STORE MONTH AND YEAR BY USING DATA FUNCTION , HERE 'M' 'Y' DENOTES SHORT FORM OF MONTHS AND YEAR
- STORE THE DATA IN VARIABLE AND THEN PERFORM THE DESIRED OPERATIONS
HOW GET 4000 WATCH TIME IN YOUTUBE FOR MONETIZATION
TRICK FOR 4000 WATCH TIME ON YOUTUBE
- first make 20 or more videos and stream atleast 2 hours
- then simply upload it,
- get any other device like smartphone or laptop or pc which have good internet connection then simply start your stream on other device
- decrese its speed from setting option
- then left it for a time
- repeate this process for few days and hours you will get enough watch time by this trick
- but dont apply this trick to complete the whole watch time
- apply this trick only to complete 60% or some more
otherwise there is a risk that youtub will decrease your watch time
- first make 20 or more videos and stream atleast 2 hours