I’ve built an e-shopping website for a big company which has country offices. What i want to do is the following Generate barcode via PHP before sending package to country offices of company When …
Multiple inputs with same name through POST in php
Is it possible to get multiple inputs of the same name to post and then access them from PHP? The idea is this: I have a form that allows the entry of an indefinite number of physical addresses along with other information. If I simply gave each of those fields the same name across several entries and submitt…
How do I initialize a PHP variable?
I am fairly new to PHP (less than a year), and to improve my development environment, I recently started using NetBeans IDE. A warning keeps popping up everywhere stating that “Variable might not have been initialized”. I’ll give an example of a variable that results in this hint/warning: My…
How to debug save_post actions in WordPress?
I have some custom post meta being generated and am ready to add to a post’s meta. I know how to do this. However, save_post causes a redirection after POST data has been sent. This means I am redirected to the dashboard and lose access to my POST data – therefore I cannot debug easily. Currently …
How do I install GD on my windows server version of PHP
I am running Windows Server 2003 and need to install a version of GD. Can anyone point out some instructions or advice? Answer Check php_gd2.dll is in your extension directory and uncomment ;extension=php_gd2.dll of your php.ini.
CodeIgniter – how to catch DB errors?
Is there a way to make CI throw an exception when it encounters a DB error instead of displaying a message like: A Database Error Occurred Error Number: 1054 Unknown column ‘foo’ in ‘…
PHP to Javascript Arrays and GPS locations
I’m making a script that will hopefully be mainly PHP so it doesn’t require Javascript later on, but right now I’m stuck on a few things. What is the best way to store GPS locations, and then compare them? I could use to store them in a database (currently using MySQL), and then find people …
How persist new Entity in Doctrine 2 prePersist method?
I’ve a Entity with @HasLifecycleCallbacks for define prePersist and preUpdate method. My PrePersist method is /** * @ORMOneToMany(targetEntity=”Field”, mappedBy=”service”, cascade={“persist”}, …
Strategy for migrating from php to java in context of SAP
I’m currently doing web application development in PHP. Management has told us we’re standardizing on “J2EE” (and yes, I keep reminding them it’s now called “Java EE”). I think the rational behind this mandate is something like “we run our business on SAP. SAP h…
How to filter out an object from an array of objects?
I’ve got an array of objects as follows ; how can I filter out (remove) the objects that have admins->member = 11 ? In this example, the resulting array object would only have the 1st object that [245] at the start. I’d like to check against the index Answer