I purchased a contact form. Great little thing but I need to convert the validation for the phone number to allow for UK number formats – in other words, to allow for spaces. Right now it validates …
Check If array is null or not in php
I have an array like below which is generated by parsing a xml url. The array is Array ( [Tags] => SimpleXMLElement Object ( [0] => ) ) The array name is $result. Now …
PHP function missing argument error
My validate function looks like that Function call example As you see, my validate function has 3 input vars. I’m not using second var – $data2 often, that’s why set it to 0 by default. But when I’m calling this function as given example (as far as I know it means $data=$lname, $data2=…
Get current date, given a timezone in PHP?
I want to get todays date given a time zone in Paul Eggert format(America/New_York) in PHP?
Matching IPv6 address to a CIDR subnet
Is there a good way to match an IPv6 address to an IPv6 subnet using CIDR notation? What I am looking for is the IPv6 equivalent to this: Matching an IP to a CIDR mask in PHP 5? The example given …
hiding the URL address in the address bar
I want to hide the url of the address bar but i have no idea how to do it, i have done some searching but found nothing. On my website i want people to just see www.roundaboutmk.com on every page, no matter what link/button they click on. for example, if they click on the “login” button it will ta…
Why does PHP not throw an error when I pass too many parameters to a function?
I am a n00b at php. I was learning about Default Parameters so I made this function. function doFoo($name = “johnny”){ echo “Hello $name” . ““; } I made these calls doFoo(); doFoo(“…
access codeigniter session values from external files
In my codeigniter project i have added KCK finder. it needs some of session values which is controlled by codeigniter. how can i access CI session values from external files ?
PHP MSSQL Server connection issue
I have a database of MSSQL server 2005. I can connect to the server via MSSLQL client software (MSSQL Management Studio). The issue is I cant connect to the server from PHP script using the same …
How to get the domain of a specific cookie?
There is a web site www.example.com All cookies are set to the www subdomain. Now there is a new subdomain and I want the cookies to be seen for all subdomains. The goal is to rewrite the www….