php

PHP - Checkbox group

Hi, I have a checkbox group in one form that I need to be posted. <input type="checkbox" value="true" checked name="chk0[]"> <input type="checkbox" value="false" name="chk0[]"> <input type="checkbox" value="false" name="chk0[]"> <input type="checkbox" value="true" checked name="chk0[]"> <input type="checkbox" value="true" checked name...

PHP - Show results, conditional based on link

Looking for some help with the code below. I think there may be an issue with the way I've organized the php call and function calls. I'm a beginner and am trying to allow users to display results from different tables, depending on what link they click. I get this error: Parse error: syntax error, unexpected '{' in /home/content/c/e...

Change the order of the 'Search this site' form in Drupal

I need to change the layout of the Search Block in Drupal. It’s currently ordered Search Button > ‘Search this site’ > Search Input but the designs I have want it to be Search Input > ‘Search this site’ > Search Button How do I go around changing the order in Drupal? I can change the search-block-form.tpl.php so the submit button i...

help me in this query

i am trying to develop a site where users can become friends of each other and can see their posts after the date the became friends........i have already posted this question about 5-7 days but could not find any solution........!! so... i have two tables.......... posts and friends and my query is $sql = mysql_query(" SELECT * FROM p...

Django, Python: Is there a simple way to convert PHP-style bracketed POST keys to multidimensional dict?

Specifically, I got a form that calls a Django service (written using Piston, but I don't think that's relevant), sending via POST something like this: edu_type[3][name] => a edu_type[3][spec] => b edu_type[3][start_year] => c edu_type[3][end_year] => d edu_type[4][0][name] => Cisco edu_type[4][0][spec] => CCNA edu_type[4][0][start_year...

Properly Filter with PHP/MySQL and Select Box

Hello all, I currently have a large table in MySQL with several fields. I am currently attempting to allow the user to filter by each field, via Select Boxes. I have 4 fields: School, Division and State. I have no problem, using PHP, on how to filter based on which option the user selects in the select box. For example, if these 3 a...

php passing Id to next page and from database

I am inserting some info into a database table with php and mysql. I am trying to diplay the same information inserted into the table in the next page. I know that if I send the ID it won't work becuase the row hasn't been created yet, it will display an empty page. Is there a way around this? I need the information to come from the tab...

Magento DataFlow Integration and Module Development Resources?

Does anyone have any good resources for developing Magento Modules that integrate with their DataFlow component? I need to build a product/inventory/order synchronization system and am finding it difficult to dive into. I've done quite a bit of digging, but can't seem to find much in terms of documentation, tutorials, examples, etc. Wha...

JQuery - Group Checkboxes

Hi, I have the following code which expands and collapses a subcategory when the arrow image is clicked. <html> <head> <script src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script> google.load("jquery", "1.3.2"); google.load("jqueryui", "1.7.2"); </script> <script language="JavaScript"> function toggleTableRows() { $(...

Wordpress Undefined property: stdClass::$post_type

I'm getting this error on my blog did some one had the same error? how can i fix the error? I didnt edited any File. Notice: Undefined property: stdClass::$post_type in /home/a4673438/public_html/wp-includes/link-template.php on line 105 Notice: Undefined property: stdClass::$post_status in /home/a4673438/public_html/wp-includes/li...

zend_db adapter not in / zend_db_expr

I have a call to a model which is just a standard class (not extending zend_db_table). I am doing a select and want to have the possibility of excluding a set of ids which which would be passed in as a variable. I curently have the following: public function getItemsBySection($section, $excluded_ids=null){ //handle this as special...

Change "HUE" of an image with PHP GD Library?

I'd like to change the "hue" of an image using the PHP image processing functions. Which is the correct filter to apply? Note: I'm from a photoshop background, so in the event my interpretation of "hue" is different from others, here's what I mean... In photoshop, you can use the "Hue" filter to change the color of an image without act...

Convert year to difference as bbcode

So i wanna do something like this in php. If i have a year in brackets [1995] I want it to convert it to the the difference of the current year to 1995. Something like "It's been [1995] years since something happened." so with it being 2009, it'd say "It's been 14 years since something happened." Obviously the subtracting part wou...

Unbuffered queries using Postgres+PHP?

Is there a way to execute unbuffered queries against PostgresSQL from PHP, or at least limit the size of the local buffer that a driver uses? ...

class-table-mapper design php and ZF

Hi, is there a better way to work with ZF useing the mappers, real life objects and table_objects. This is how I do it with Zend Framework: class User_DbTable extends Zend_DB_Table_Abstract{ protected $_name = "user"; // name of the table } the user class -> user object: class User{ protected $_id; protected $_name; pr...

How Do I add PHP code to my Codeigniter view file?

I would like to add some PHP to my Codeigniter view, for, say, a dynamic date in the footer. What is the very best way to manage this? ...

Standard change comments

I am looking for some direction as to a standard format for commenting changes in PHP. Continually while working with an assortment of developers on large scale projects, comments run wild and in most cases changes are either poorly commented or not commented at all. Here is an example, please feel free to expand on it: /** * Author...

IP.Board 3 Cookies

I am integrating a custom written CMS with IP.Board 3. I would like to use the cookie information (username) that IP.Board stores upon login. Does anyone know how I can access that cookie? This would be in PHP, of course. ...

PHP $_SESSION variables don't persist -- why not?

The first line of code, called on every one of my application's pages, is: <?php require_once('../../_includes/initialize.php'); ?> That file calls my classes, including SESSION. The SESSION class calls session_start() before anything is output to the browser. On one page I'm using a form that has a ton of checkboxes, all with the na...

Problems displaying some characters

I've got an XML file from which I've extracted the following text - The Sansa Clip+ MP3 player gives you more to enjoy. Enjoy up to 2,000 songs†† with an 8GB* player, FM radio, long-life battery and voice recorder. PLUS now even more! Expand your enjoyment when you add in preloaded content cards** into the new memory ...