[SOLVED] Warning:mysql_fetch_array expects parameter 1 to be resource
when you pass a query result to mysql_fetch_array, it should contain some data otherwise it will returns a warning like "mysql_fetch_array() expects parameter 1 to be resource (or mysqli_result), boolean given"
What is maximum length of ip address?
So how many characters is enough to store an ip address in a mysql table? As the length of IP address varies from IPv4 to IPv6, To define the size of a column that ip address is going occupy, we must know maximum length of the ip address in both versions so that we can assign the maximum length to mysql column.
Regex check minimum and maximum length
Using Regular expression( Regex ), We can check whether the given string has minimum no. of characters or whether it is inside specified range etc.
html input disabled not posted, why?
A form element if set to disabled, then the element value will not posted. This is a standard behaviour, To overcome this we can use readonly attribute.
disabled vs read only difference
Though both disabled and read only primary job is preventing content being edited, still there are few differences exists between them.
http_host server_name difference
To get a domain name in php, we use http_host or server_name variables. But what is the difference between http_host and server_name and which one will return more accurate results?
Replace string in javascript
Generally, "replace" method in java script replaces only the first occurrence in the given string. We can change this behaviour by using regular expression.