How to store image in MySQL database via PHP?
Latest Answer: We can use the "blob" datatype for storing the the image into the table. ...
How will you calculate difference of two dates using PHP?
Latest Answer: // Calculate difference and returns the difference in days.function bozimsDateDiff($date1, $date2){ return floor(($date2 - $date1) / (3600 * 24));}// Usage$date2 = time(); // e,g Date 2 CURRENT DATE TIMESTAMP$date1 = mktime(0,0,0,1,17,1988); // e,g ...
How will you increase execution time of PHP for processing large set of records?
Latest Answer: To increase the execution time runtime, we can use the ini_set() function.e.g.ini_set('max_execution_time','-1'); - it sets maximum execution time to infinity. ...
How to combine 2 arrays?
Latest Answer: //The array_merge() and array_combine(), both combine arrays. /*It merges two arrays, one after the other.*/$comArrays = array_merge(Array1,Array2);$comArrays = $larger_array12; /*It combines two arrays where one pass to be the index or key value ...
Can you set JavaScript variable value to php variable? Justify your answer?
Latest Answer: You can set value of JavaScript variable to PHP variable in following wayfor e.gvar i=''; ...
What is the difference between "echo" and "print" in PHP?
Latest Answer: echo is constructor and print is function.echo cannot take arguments but print can take arguments. ...
Which will execute faster POST or GET? Explain
Latest Answer: GET transfer data to the server using URL whereas POST transfer data using form collection which is added to the request by the browser. We can send at most 1024 bytes using URL hence there is upper limit for GET method POST method can transfer large ...
How to prevent form hijacking in PHP?
Latest Answer: Few more coding practices can be done to avoid PP Form HijackingUser Input Sanitization-Never trust web user submitted data. Follow good clieint side data validation practices with regular expressions before submitting data to the server.Form Submision ...
What is the difference between session_register and $_session?
Latest Answer: session_register() is used for register one or more global variables with the current session. While $_SESSION[] array is used for storing one or more variables with in the current session array. session_register() depends upon register_global is enable ...
What are new features that are in added in PHP5?
Latest Answer: PHP5----Strong OOPS support 1) Data Encapsulation (public, private, protect visibility for member variables and methods) 2) Concepts like Abstraction, Inheritance, Reflections(reverse engineering APIs) 3) More Magic Functions like __construct, ...
View page [1] 2 3 4 5 6 7 8 Next >>

Go Top