php

Writing own LDAP controller in php

Hi, to centralize my address books I'm thinking of doing that via a LDAP service. As I haven't found a free service somewhere, I guess i have to implement this on my own. So the basic idea is to implement a search (which is restricted to contacts only) and a small filtering capability. The search looks the records up in an backend mysql...

Memcache - Local or Dedicated Server?

What are the pros and cons of having memcached running on a seperate server instead of locally? This is my server setup: -2 Dedicated Servers (Load Balanced) -1 Dedicated MySQL Server -1 Dedicated Memcached Server Is there any benefit of dropping the Memcached Server and putting the daemon locally on the 2 dedicated servers? Or is that...

how to remove row in table using ajax?

i fetch the result from database on click event of combo box now i am try to remove or delete value from database and also remove from table row.problem is, when i click on href the value is deleted from database and display fetched result no showing.pls guide ...

Calendar generation strange fail

I set out to generate a array containing a 12-month calendar starting on this (now) month. This is for a particular application, and requires special code, so I cannot use calendar libraries. Here's the code I have: header('Content-type: text/plain'); $Cal1 = array(); $now = new fTimestamp('now'); $now = $now->modify('Y-m-1 00:00:00'...

Radio button checked property.

How can I know if the radio button checked property is true in PHP, can anyone give me an example? Thanks.. ...

cross-browser async uploader?

Anyone looked into this recently? 12 months ago i was using Uploadify 6 months ago i switched to Plupload which was the best i could find, what are people's thoughts, is Plupload still the best uploader for multibrowser async image uploads? I'm about to start a new site... ...

Dynamic Subdomain PHP

Okay, this might have been answered before but apparently up until now I still haven't found the answer. You may notice there are some websites that may allow users to register to instantly get a subdomain of their own in the website. For example, the domain is www.domain.com. If I register a new user as henson, I will get my own page ...

how to create switching tabs between the pages

I am creation online question paper for this i wants to add the previous ,next , submit button ( note; i need each page containg only one question ). If there is any link is there means please guide me. thanks in advance ...

PHP - Display the current date in words?

Is there a way to use getdate (or similar) to output the current day in a format like this twenty october twenty ten I can't have the year as 'two thousand ten' due to space restrictions so it just needs to be 'twenty eleven' 'twenty twelve' etc ...

Suggestion needed for optimizing a MySQL query.

I'm using parameterized queries with PHP I have the following two queries: SELECT username,question_text FROM questions,users WHERE questions.question_id = 4 AND questions.user_id = users.user_id and SELECT username, post_text FROM posts,users WHERE posts.question_id = 4 AND posts.user_id = users.user_id ORDER BY posts.post_id AS...

How can I submit my Drupal form to any other internal page?

Hello, I'm having a problem with Drupal forms. Can't think of a way to solve it and I was wondering if any brain out there has the solution to my problem. I have this form: <?php function mymodule_myform(){ $form['#action'] = url('search/cards'); $form['whatwhere']['what'] = array( '#type' => 'textfield', '#title' => t('Wh...

JS script running for every element, rather than simple clicked element

using jQuery, I am trying to get an action assigned to a button on a form. I have 50 of these forms on a page, but every time I click one link, the form action is run 50 time!! I ran this to check, and it comes to exactly 50 `i=1 $('.thumbs').click(function(){ console.log(i,"Click Count"); i++; )}; this has th...

How to access a .php file with Kohana (ignore routing)

Hi, let's say we have simple file <?php echo "hello world" I'd like to place the file in /modules/myModul/(somewhere). Where do I have to save the file and how do i call it via the browser url? ...

Need help with jQuery to clone form dropdown (dynamic dropdown)

Hello All, I am using PHP to generate dynamic dropdown, the dropdown list items are fetched from database. Here's the php code for that and it works. <select name="title[]" id="title"> <?php $categories = Category::find_by_cid(5); foreach($categories as $category): ?> <option value="<?php echo $category->name; ?>"><?php echo $category...

Select some but not all child nodes

I have the following XML structure: <?xml version="1.0" encoding="ISO-8859-1"?> <articles> <article id="1"> <title>Article title 001</title> <short>Short text</short> <long>Long text</long> </article> <article id="2"> <title>Article title 002</title> <short>Short text</short> <long>Long text</long> </arti...

PHP need to display MPTT without modifying MySql database

I have a MPTT organized MySql database which i need to display , there is no level limit and i can't alter the database, i've tryed http://dev.mysql.com/tech-resources/articles/hierarchical-data.html, but still got me a few headeachs. ...

Need help with PHP "include" - How to save the path to my website in variable ?

I use the following scheme to include PHP files: require($_SERVER['DOCUMENT_ROOT'] . "Path/To/My/Website/Path/To/My/File.php"); I would like to save $_SERVER['DOCUMENT_ROOT'] . 'Path/To/My/Website' in some variable, say $my_website, and write: require("$my_website/Path/To/My/File.php"); This way, if I decide to change the path ...

Error in sample functional tests with Yii

Recently I've discovered Yii framework and started learning it. I've generated app skeleton using yiic tool, installed PHPUnit, SeleniumRC and attempted to run functional tests provided by skeleton app (I didn't change anything). > phpunit functional/SiteTest.php Report said following: There was 1 error: 1) SiteTest::testLoginLog...

html to pdf very large files php

hi i am trying to create a pdf files in php useing dompdf-0.5.1 i am creating these files from html i have a large number of data everytime i try to create a big file its getting stuck giving me errors is therey any library that i can use for large pdf files from html also its working for small and normal files thanks Fatal error: ...

PHP create savable PDF

Hello, I know, it is posible to create PDF's from PHP. fpdf, tcpdf, ezpdf, zend_pdf are some examples. Al those libraries does not support creating a "savable pdf". I mean by that, a pdf with some input fields, and after entering the fields, just save the complete pdf, with the data. Anybody idea's? Alessandro ...