Limiting characters of password
i have a simple question.. in registration script.. how can i set the limit character of a password. sample: minimum character is 6.. so what will be the code. please help me. :-( ...
i have a simple question.. in registration script.. how can i set the limit character of a password. sample: minimum character is 6.. so what will be the code. please help me. :-( ...
I have got the following array. Array ( [1] => a [2] => b [3] => c [4] => d [5] => e [6] => f [7] => g [8] => h [9] => i [11] => j [13] => k [14] => l [15] => m [...
Hello, on the project I am writing with Symfony, there will be fieldsets in forms very often, so I would like to create a mechanism so that I can group fields by fieldsets and still use the __toString() method of my forms. On this page, I read about the sfWidgetFormSchema, and how it could be considered as a widget, which enables to nest...
How do you strip the first (before any visible text) enter/return space from text taken from a variable (submitted from a textarea)? ...
Using CakePHP's shell scripts I'm having problems accessing constants, which I normally set within config/bootstrap.php. Is this because using shell scripts I'm not going through the normal dispatcher routine? What's the best practice for defining constants across shell scripts? Thanks. ...
Hello, filter_var($url, FILTER_VALIDATE_URL) seems to be great way to detect if $url contains url or not. Is there any way to see what regular expression this function uses for detecting? Thank you ...
I need an option from within PHP to Manipulate .docx (Microsoft Office 2007) document. I need to: Read the internal text Convert to .html To view them inside a browser. To replace text. I know I can use Word Automation, creating a COM object of Microsoft Word, but it's too slow, unstable and I have to have it installed on the server...
I m tring to send data using post method from one page to another. but i m not receiving data in target page and getting error of undefined index name_of_variable when i m trying to get that data using $_REQUEST[] method I m using following code: ---- --- ...
In short I am looking for something like google-diff-match-patch in PHP. I have had a look at some similar questions at SO, and also at the algorithm provided here, but all of them fail: diff("draßen", "da draußen") should not give <del>draßen</del> <ins>da draußen</ins> (which is kind of stupid for my purpose, because I want to...
Hello, I have an RSS feed, users will be using it to rip content to display on there site. However I need todo a check that the site doing so has access. Its just occurred to me that I have no idea in PHP how to detect if the script is being read by a server and what the URL is of the fetch. Is it possible? ...
I have links in my site that pass queries to pages that query from an external database. This works fine e.g. mysite.com/catalog/?tl=flooring however i want to rewrite this url to appear as mysite.com/catalog/flooring Ive tried modifying the rewrite rules in wordpress but it always displays the index page add_filter('rewrite_rules...
I've been trying to use a Web Service which has the WSDL file below. The bit I'm not sure about is what I am supposed to pass or do with the first part of it. It asks for a personaldetails object with a tns type to be passed to it but I don't understand what that means? The actual method I am trying to use is called PersonalDetails_Up...
PHP's mkdir function has the following signature: bool mkdir ( string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context ]]] ) I would like to call this function specifying the $pathname and $recursive set to true, but I wouldn't like to specify the $mode parameter. We control permissions on new files/directo...
Hi everybody, I have a problem with getting some html value stored in a php array: $data = array("Name"=>'<div style="color:red"></div>'); while(list($key,$val) = each($data)){ print_r($key." => ".$val) ; } The problem is that the script (put inside html tags) returns: Name => Foo Bar So, the div (so the html) is interpretated. ...
I have this code: $a = array ('zero','one','two', 'three'); foreach ($a as &$v) { } foreach ($a as $v) { echo $v.PHP_EOL; } Can somebody explain why the output is: zero one two two . From zend certification study guide. ...
Is there any way to trim (remove leading/trailing spaces) the input entered by a user into a jQuery auto-completing text <input> box before it is matched against the list of names:values? I currently have a textbox in which users are meant to enter names. The names are then matched against a list of name:value pairs by jQuery: <script t...
Hi I have a php includes on my site for header and footer on each page. I am changing the site to allow users to log in and out etc. How can I pass things like username to the header? Also I will want the header to display Log In when no user name is present but Log Out when a username is present. Any help appreciated. Richard ...
Hay, i'm trying to parse an RSS feed from a wordpress blog. So far everything is working as expected, here's my code <?php $feedUrl = "FEED URL"; $rawFeed = file_get_contents($feedUrl); $xml = new SimpleXmlElement($rawFeed); $channel = $xml->channel; $items = $channel->item; foreach($items as $item){ ec...
i think my question is not clear but i try to illustrate my point here. assuming i have a many to many, self referencing relationship where a user can be a teacher (say u post answers at SO) and a teacher can be a student (u may answer questions but may ask too) too. namespace Entities; /** @Entity @Table(name="users")) */ class User {...
Hi, I am using PHP & want to parse given string: Let say $str = '<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/W-WKYIgGBbU&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="http:...