For this purpose you need to do some optimization with image files. Image resize while uploading is one of them. All major website do it in the same way. If a user uploads a 5mb image file they resize it…
Expand +All Articles
Multiple File Upload with PHP
HTML Markup We need to add a simple html form with input type file and submit property. We also need to give file input type file name with box breaks like files[]Â and need to add a property named multiple. Here…
Expand +bind google places autocomplete on textbox without instantiating a google map
Hello, In this post we will learn how to bind google places into textbox without instantiating google map. lets see how to do..
|
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<!DOCTYPE html> Â Â Â <html> Â Â Â Â Â <head> Â Â Â Â Â Â Â <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> Â Â Â Â Â Â Â <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> Â Â Â Â Â Â Â <script> Â Â Â Â Â Â Â Â Â Â Â var autocomplete; Â Â Â Â Â Â Â Â Â Â Â function initialize() { Â Â Â Â Â Â Â Â Â Â Â Â Â autocomplete = new google.maps.places.Autocomplete( Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /** @type {HTMLInputElement} */(document.getElementById('autocomplete')), Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â { types: ['geocode'] }); Â Â Â Â Â Â Â Â Â Â Â Â Â google.maps.event.addListener(autocomplete, 'place_changed', function() { Â Â Â Â Â Â Â Â Â Â Â Â Â }); Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â </script> Â Â Â Â Â </head> Â Â Â Â Â <body onload="initialize()"> Â Â Â Â Â Â Â <div id="locationField"> Â Â Â Â Â Â Â Â Â <input id="autocomplete" placeholder="Enter your address" onFocus="geolocate()" type="text"></input> Â Â Â Â Â Â Â </div> Â Â Â Â Â </body> Â Â Â </html> |
PHP code to autocomplete places on textbox
Hello, In this post we will learn how to create autocomplete textbox field with places (Country, City, State) in php. For this purpose we will use google API Â and autocomplete script. Code is below…Lets see how to do..
|
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<!DOCTYPE html> Â Â Â <html> Â Â Â Â Â <head> Â Â Â Â Â Â Â <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> Â Â Â Â Â Â Â <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> Â Â Â Â Â Â Â <script> Â Â Â Â Â Â Â Â Â Â Â var autocomplete; Â Â Â Â Â Â Â Â Â Â Â function initialize() { Â Â Â Â Â Â Â Â Â Â Â Â Â autocomplete = new google.maps.places.Autocomplete( Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â /** @type {HTMLInputElement} */(document.getElementById('autocomplete')), Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â { types: ['geocode'] }); Â Â Â Â Â Â Â Â Â Â Â Â Â google.maps.event.addListener(autocomplete, 'place_changed', function() { Â Â Â Â Â Â Â Â Â Â Â Â Â }); Â Â Â Â Â Â Â Â Â Â Â } Â Â Â Â Â Â Â </script> Â Â Â Â Â </head> Â Â Â Â Â <body onload="initialize()"> Â Â Â Â Â Â Â <div id="locationField"> Â Â Â Â Â Â Â Â Â <input id="autocomplete" placeholder="Enter your address" onFocus="geolocate()" type="text"></input> Â Â Â Â Â Â Â </div> Â Â Â Â Â </body> Â Â Â </html> |
How to integrate Gravity Forms with Google Spreadsheets:
Gravity Forms is an extremely popular Forms plugin for the WordPress. When someone submits a form created with Gravity Forms, the form data is saved inside the MySQL database . There are step by step process to integrate Gravity Forms with…
Expand +How to create pagination using PHP and MYSQL
Paging (Pagination) means showing Database results in multiple pages instead of one long page. if we have more than 100 records in database and we want to show all results but not in a single page, so we can devide…
Expand +How to create line chart in php and my sql
Line chart graph is very usefull to show sell and purchase graph layout of monthly, weekly, yearly as we want. To create line graph: first ,we create a index.php file to show garph and second, create get_line_chart.php to  get data…
Expand +Difference beetween GET and POST methods in PHP
GET: Parameters remain in browser history because they are part of the URL Can be bookmarked. GET method should not be used when sending passwords or other sensitive information. 7607 character maximum size. Example: http://www.test.com/index.htm?name1=value1&name2=value2
|
2 3 4 5 6 7 8 9 10 11 12 |
<form method="get" action="<?php echo $_SERVER["PHP_SELF"];?>"> <label for="inputName">Name:</label> <input type="text" name="name" id="inputName"> <input type="submit" value="Submit"> </form> |
POST: Parameters are not…
Expand +Different types of errors in PHP.
Notices, Warnings and Fatal errors are the types of errors in PHP Notices: Notices represents non-critical errors, i.e. accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all but…
Expand +Echo VS Print Statement
ECHO: echo and print are more or less the same. echo() and print() are language constructs in PHP, both are used to output strings. The speed of both statements is almost the same. echo() can take multiple expressions Example:
|
2 3 4 5 6 7 8 9 |
<?php echo "<h2>PHP is Fun!</h2>"; echo "Hello world!<br>"; echo "I'm about to learn PHP!<br>"; echo "This ", "string ", "was ", "made ", "with multiple parameters."; ?> |
…
Expand +