php

how can I remove a quickform rule?

I have a form that has several validation rules defined via quickform. I am using a hook to inject some code into the process, and want to remove/disable a rule that was defined earlier in the code. Does QuickForm have any way to "unset" a rule? ...

Can GD make text appear warped (made to look like it wraps around a curve slightly) ?

I am placing some text over an image using PHP's GD library. The background image is a ball. Ideally, the text should warp slightly to look like it is on a curved surface. It should be largest in the middle, and scale slightly smaller on each end (text is not known before hand either, but there is a maximum length of 15 chars). Is this...

How to add / edit a cookie in php?

I'm using the following functions to set an array of values in a cookie in PHP, but I also need an "add" and "edit" function - any suggestions on how I can do that? function build_cookie($var_array) { if (is_array($var_array)) { foreach ($var_array as $index => $data) { $out.= ($data!="") ? $index."=".$data."|" : ""; } ...

php: ftp-server find out if file already finished uploading/if directory is currently working?

hey guys, weird and probably complicated question. i'm working on a little php ftp-browser-client. It's actually a lot simpler than it may sound. I'm just reading all my files and folders on the server and printing a list of them. I wonder now if there is a way for me to retrieve information of a folder which is just in use. For instance...

Is there any "code corrector" for Vim which highlights HTML, PHP, CSS mistakes??

Sometimes when I make coding mistakes I spend a lot of time finding the error. Is there a plugin which makes Vim underline or highlight PHP, HTML or CSS mistakes? For instance: <?php foreach ($row as $r) { <echo '<h1>' . $r->title . '</h1>'; } ?> The '<' before echo will be highlighted in red. Vim has HTML correction but I n...

Securing Drupal?

This is my first time using Drupal and I am loving it, but there are a lot of configurations to go through (which I love) and I am afraid there is something I need to enable/disable to make Drupal production ready. I did see that printing errors to the screen is enabled by default so that is why I am asking if there is anything else. ...

How to code number in string and later decode it ?

I'm looking for encrypt/decrypt functions that will encode numbers (0, 1, 2, ...) into strings, such that these strings will look random, and later the number could be decodes back from the string. For example: 3 will be encrypted to ABFQWEMasdEE, and 6 will be encrypted to poad_Asd#@sad. If I could control the number of characters in ...

Getting a PHP variable in jQuery

So I have this: <?php echo ' <script> $(function(){ $("a#yeah").click(function(){ $.ajax({ url: "ajax.php?action=yeah&id='.$id.'", success: function(html){ $("a#yeah").html("your cool") } }) }) })</script>'; ?> basically I am using the PHP variable $id wich can be...

Recursive tree CRUD PHP using a single MySQL table

i'm using a tutorial from jesse price but it isn't working for me, its only showing the root element, so I wonder could anybody give me a clue how a recursive tree's CRUD would work? It was an interview question, needless to say, i don't have the job, but still I want to know how it works.... using a single MySQL table please help! ...

quick function to replace ' with \' in php

Having a mental block.... I know this is so easy.... but nothing is going my way today! Can anyone help me with a quick function to search a string and escape all apostrophes in php. Thanks. ...

javascript running fine in mozilla but gives unknown runtime error in IE6,why?

iam using simple blow up trick in my page . first the div is set as hidden and then when we click the image ,a blow up opens with a overlay image in the background. The javascript function simply seta innerhtml. This all runs fine in mozilla but it gives unknown runtime error when i try to see it in IE6 and thats why image blow up doesnt...

Speed of inheritance in php

Hi, I wonder what is the speed price of using inheritance in php. ...

Drupal exposed view

is there a way to not display any results initially until the form has been submitted? Also, I cant see where I can override the exposed form ...

add global revision number in php source files

Hi I want to replace a global revision no (head) in my PHP source files whenever I make a checkin (or update) for example I have below code <?php print 'Rv no : $glbRevisionNumber$'; ?> in all the php files that have under one folder eg. myapp/* the $glbRevisionNumber$ should get replaced with the current head revision number. H...

Zend Framework: preDispatch ACL plugin causes requests to non existent page to Access Denied instead of 404

i have setup a preDispatch plugin for my ACL. i have used the controller as resource, action as privilege. when i try to goto a non existent page, i get to the access denied page instead of 404, i think because the resource and privilege are queried and since they are not found, it goes to the access denied page... how can i fix this? ...

Problem in calling SOAP web service (written in PHP) from ASP.Net

Hi, I am trying to call a webservice, written in PHP from ASP.Net. I have added Web Reference using "Add Web Reference". The url is: http://mikikard.com/public/webservice?wsdl In Add Web Reference Window, I can see the list of functions. But, When I try to build the Website, It gives the following Error: Unable to import binding 'Soap...

Column not found: 1054 Unknown column 'category_ids' in 'field list'

problem in Magento ver. 1.3.2.4 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'category_ids' in 'field list' can anyone help? i go to Add products, Edit product but i get that error when trying to save. ...

Implementing this Java password encryption algorithm in PHP

Hey, I'm trying to implement a password encryption algorithm used in Funambol mobile sync server in PHP but I'm having hard time as I come from a non-Java background. The code itself seems simple: encryptionKey = "Omnia Gallia in tres partes divida est"; byte[] newValue = new byte[24]; System.arraycopy(encryptionKey, 0, newValue, 0, ...

the value is not inserted in db

i want to store more than 1000 character in database i use mysql database. when i insert 50-100 character the code run successfully.but when i insert 1000 character it not inserted. even it also not give error. when i use similar insert query in myphpAdmin, the query run successfully. this is query first two fields are varchar & last ...

calender highlight

i want to create functionality in which to-do list will be on left side and one calender will be on right side.what ever due date i select in to-do list,it should be highlighted in calender,how can i do that? ...