How can I get the error message for the mail() function? You can use error_get_last()when mail() returns false. $success = mail(‘example@example.com’, ‘My Subject’, $message); if …
Read MorePDF open in div or html file
https://stackoverflow.com/questions/29941646/what-is-the-best-way-to-display-pdf-in-div-or-panel
Read MoreEmail Validation check in javascript
## Used To Validate Email In Javascript <script > function validateEmail(email) { var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; return emailReg.test( email ); …
Read MoreGenerating child categories
// For Generating Array Parent & Child Wise $this->dash_model->cattest(0)); public function cattest($parent_id) { $sqlquery = ” SELECT * FROM categories where parent='” .$parent_id . “‘ …
Read MoreUpload image in php
#IMAGE UPLOAD if ($_FILES[‘list1’][‘name’] != “”) { $allowed_ext = array(“jpg”, “jpeg”, “png”, “gif”); $extension = explode(‘.’, $_FILES[“list1”][“name”]); $ext = strtolower(end($extension)); if (in_array($ext, $allowed_ext)) { $newname …
Read MoreData table options
# DataTable Link # Data Table Options # Modify Data table data show option # Modify Datatable Page Show Value <script type=”text/javascript” src=”//cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js“></script> <script type=”text/javascript”> …
Read MoreOn select redirect to selected option
## On Select Option Redirect to Another Page $(“#getcity_understate”).on(‘click’, function(){ var s = $(“#under_state_id”).val(); window.location.href = “manage_city_list.php?ustate_id=”+s; });
Read MoreHow to show location in Google maps
$location = “kolkata”; <div style=”width: 100%”> <iframe width=”100%” height=”480″ frameborder=”0″ scrolling=”no” marginheight=”0″ marginwidth=”0″ src=”https://maps.google.it/maps?q=<?php echo $location;?>&output=embed”></iframe> </div>
Read MoreHow to integrate google language translater in website
It is the link , from here we can create a plug-in for Google translater. https://translate.google.com/manager/website/ A small code will generate like: Script code will …
Read MoreScroll to top
## scroll to top:: <style type=”text/css”> #plz-ridemeto-top{position:fixed;bottom:20px;right:10px;cursor:pointer;display:none;} </style> <script> $(‘body’).append(‘<div id=”plz-ridemeto-top” class=”btn btn-info”><span class=”glyphicon glyphicon-chevron-up”></span></div>’); $(window).scroll(function () { if ($(this).scrollTop() != 0) { $(‘#plz-ridemeto-top’).fadeIn(); console.log(“scrolled”); …
Read More