php

Doubt about TinyMCE content css

Hi everyone. I am facing a problem with tinyMCE. I am giving a functionality on admin side of my website, where admin can edit the content of pages. I have provided them with the tinyMCE for that purpose. Suppose they are editing Page 'page1'. They will provide its content in tinyMCE, and save it. When somebody is visiting that Pag...

I need get the IP address

I need get the IP address for the user cross the proxy using PHP... any suggestion ? ...

Magento, add VAT nr to billing address

It is possible in magento to add a VAT nr to your account but in belgium it's more common to add a VAT nr to your billing address.. is this possible in some kind of way ? ...

Do interfaces solve DDD with code duplication?

AccountController can't extend BaseAccount and BaseController at the same time. If I make all BaseAccount or BaseController methods empty, I can have an interface, but if I implement that interface in two different places, that is, I make a contract to implement a method in two different places, I will have duplicated code. Do interfaces...

PHP Paypal intergration with instant feedback

Is it possible to get an instant response from a paypal transaction and do they have to leave your site to pay by paypal? I am working on a site where the user needs to make a one off payment so I have been looking for donation scripts, but most of them are pay for and the only one I found does not give an instant response http://www.ib...

changing php.ini settings on heart internet

I am trying to upload large files through my cms and was wondering how to change the php.ini file for heart internet. Is this possible in shared hosting, if not are there any other work arounds? Thanks in Advance ...

preg_replace problem

Hi, I'd like to match and extract variables from: {{variable:int}} variable would be anything a-z : is a separator int would be an integer 0-9 Curretly i have: preg_replace('!\{\{(\S+)\}\}!', "$1", $string) which does only half the job, i still have to split by :. Thank you! ...

limit and offset foreach loops

Say i want to loop through XML nodes but i want to ignore the first 10 and then limit the number i grab to 10. $limit=10; //define results limit $o=20; //define offset $i=0; //start line counter foreach($xml->id AS $key => $value){ $i++; if($i > $o){ //if line number is less than offset, do nothing. }else{ if($i == "$limit"){brea...

php every sixth row add class

Hi all, I have a mysql query which selects 18 items from the table, but I'd like it to add a class on every 6th item. Here's my code: $i = 0; foreach ($this->Items as $item) { if ($item->image) { echo '<div class="storeImages"> <img src="/images/store/'.$item->image.'" width="113" height="153" border="0" alt="'.$...

automatic delete option

Hi Friends. I am new to PHP and Javascript. I am uploading files that after 15 days need to be deleted automatically from the database. Please can anyone help me out. I am using following code for uploading: <?php $nid = 1; $teaser = false; // Load node $node = node_load(array('nid' => $nid)); // Prepare its output if (node_hook($n...

PHP preg_match problem

Hi guys i'm having a problem, I have the following code: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" width="320" height="240"> <param name="movie" value="http://www.domain.com" /> <param name="quality" value="high" /> <param...

Help with Sessions Issues

This just a same script in different server: The link below works. When you enter the correct characters it display success. http://mibsolutionsllc.com/captcha%5Ftest/test.php This link below works. Even you enter the correct characters. Display always error. The session value doesn't give function the right way. http://www.universit...

Ubuntu: Configuring Xdebug (PHP) for Eclipse 3.2

Hi, I have installed Eclipse 3.2 in my ubuntu system. I have added the php plugin to eclipse by following steps Help > Software Updates > Find and Install.. > selected "Search for new features to install" and clicked "NEXT" > clicked "New Remote Site" > Gave name = "PHP" and url = "http://update.phpeclipse.net/update/nightly" > Cli...

How to load helper from model in CodeIgniter?

I want to load some helper in a model. How to do this? Tried to use: ${get_parent_class($this)}->load->helper ('text'); But still getting an error Fatal error: Call to a member function helper() on a non-object ...

PHP 200+ Form Fields...

Just to give you a bit of background i have a system where there's certain calculations that need to be calculated in the main section, there'll be various form fields under different tabs, for simplicity sake i have 10 sections, all with 20 drop down boxes and when you change the value of one of the drop downs it's recalculated in the m...

jQuery find() returning an empty string in Google Chrome

I'm using jQuery to setup an Ajax request that grabs an XML feed from a PHP script and then parses some information out of the feed and inserts it into the DOM. It works fine in Firefox; however, in Chrome, I am getting an empty string for the title element. Here's the basic setup of the Ajax request: $.get('feed.php', function(oXmlDoc...

Equivalent of url() helper function in Zend controller

In the Zend view helper, there is the function url() for outputting a URL based on the routing tables eg $this->url(array('controller' => 'comments', 'action' => 'add') How can I do the same thing in a controller? In particular I want to set the action URL for a Zend Form using controller/action syntax rather than a standard URL eg $...

How can I access the configuration of a Zend Framework application from a controller?

I have a Zend Framework application based on the quick-start setup. I've gotten the demos working and am now at the point of instantiating a new model class to do some real work. In my controller I want to pass a configuration parameter (specified in the application.ini) to my model constructor, something like this: class My_UserContr...

How to get multiple items from <select> with PHP?

I'm building a theme options page for my WordPress theme and I would like to have a functionality to select multiple items from a list. The "one option" select code I use looks like this: http://pastie.org/684800 and it works perfectly. I'm a PHP newbie so I tried to modify the above code to achieve the result I want. Here's what I cam...

looping through xml nodes where a type is "Array"

Im having some trouble looping through some xml data. The xml file is structured like this: <users type="array"> −<user> <id>14527576</id> </user> −<user> <id>14527576</id> </user> −<user> <id>14527576</id> </user> My php to loop through it looks like this $xml = simplexml_load_string($rawxml); foreach($xml->users ...