php5

PHP $_POST, $_GET, and $_REQUEST keys

Is there ever a case (like some quirky browser) where a form input field's id becomes the key in $_POST, $_GET or $_REQUEST, instead of the field's name? We were having trouble with a field where the ID didn't match the name. Changing the ID to match appeared to fix the problem. The issue was purely PHP parsing; no JS involved. Coinci...

Zend_Service_Twitter Oauth Incorrect Signature

I have sucessfully connected to twitter using Zend_Oauth_Consumer and got an access token, however when i try to use this access token i am getting an error. This is the code: $token = unserialize($twsession->access_token); # would be in DB $twitter = new Zend_Service_Twitter(array( 'username' => $token->screen_name, 'accessTok...

PHP fileinfo is undefined function

Whenever I try to get the mime content type from php, it echos: Fatal error: Class 'finfo' not found in /home/jobynadel/finadel.com/video/finfo.php on line 4 or Fatal error: Call to undefined function finfo_open in /home/jobynadel/finadel.com/video/finfo.php on line 4 I just can't figure it out! The code I am using is: $file_info =...

zend get posted variables from static form from the view file

Ok so i tried using zend form but what i'm trying to accomplish is way too much for me to handle zend form. I'll try to describe it in a few lines maybe you have a solution for me if not you will understand why i chose to use a form in a view file. I have a form for searching products in a database. THe search is done using autocomplete...

How to use xdebug with eclipse IDE for PHP

Hi my PHP project is set up on a remote test machine. I need to debug it using eclipse IDE. How shall I progress. I came to know i should prefer Xdebug rather than zend debugger. Please clarify my doubt. ...

how to remove all utf-8 characted from string using php

Hi I have a problem as below. I have one xml which contain utf-8 characters but the data of this xml will get displayed on page with iso encoding. So I have to remove this utf-8 charactres from string, How can I do this. Thanks Avinash EDIT: I have used : iconv("ISO-8859-1", "UTF-8", str_replace('&','and',removeEmptyLines(strip_tags(...

[Symfony2] Incompatible Kernel method signature

Hi, I'm encoutering a problem, but really don't understand why! I get this error when launching Symfony ( via front controller or CLI ) PHP Fatal error: Declaration of ECommerceKernel::registerContainerConfiguration() must be compatible with that of Symfony\Framework\Kernel::registerContainerConfiguration() The problem is the overr...

Excel validation using php

Hi, I have an excel sheet that is loaded with a dynamic result set of data.I need to validate the excel sheet before insert into mysql table.Validation such as Is there any duplicate entry,email validation etc.Any idea about how can validate using php. ...

I want to make a "Frequent searches" engine. ¿directions?

Hi, this post is just to know if anyone here has done something similar and what do you think about the right way to do that. My first idea was start storing every word in the db ignoring words with 2 or less characters and every time a word is repeated just add one to a counter row (say importance) to appear first on the list of frequ...

page expired message in php script

i am working on an e-commerce website using php. i have tried post/get and now session but problem is persisting. when i hit back button it display message page has expired. i thought may be i am not handlling session variables proparly but i dont know what to do ? what could be cause ans what could be solution . ...

Are comments in CakePHP Code really even used/necessary?

Reading through the core and looking at nearly all of the helpers/plugins etc. that are available, I notice there are a lot of comments. CakePHP is structured in such a way that it is very simple to determine where things are and what they are doing. Is it really necessary to comment all of this code? Does it make the source more messy...

sending a value with input get ?

<a href="companies.php?id='. $_GET['id'] .'&offset='. $next_offset .'"><input id="button" type="button" value="More"/> i somehow want to send &offset=avalue but useing a input button. without the id. how can i do the similer thing with useing form action get ? like ( warning epic fail ) i should add a hidden input or something ? ...

Undefined variable, but it is there

Hello, I've got an array, but when I try to use it, I get the Undefined variable notice. Here's the relevant lines: $varEvents = array(); ... if ($selectedResult) { while ($row = mysql_fetch_assoc($selectedResult)) { array_push($varEvents, $row['eventID']); } mysql_free_result($selectedResult); } ... print_r...

How to add multiple images to the node programmatically in Drupal - if possible

I am trying to attach multiple pictures to the node programmatically in drupal 7 but have no idea how. i am not even sure its possible. Here is my code for attaching one picture to the node and it works. Please if someone can help me how to attach multiple pictures more than one to the image field $node->field_image['und'][0]['fid'] = $...

Zend Virtual Machine Advantages

Hi all, I was trying to understand the working of Zend with the help of this excellent article. Its when I found out that Zend Engine was a Virtual Machine. Now my question is whats the advantage of creating an intermediate code for scripting languages like php? I can understand that having Intermediate Code in the case of prog...

Is there any sample code for developing the Cardscanning(CSSN) using PHP?

Hi Friends, I want to develop a module for card scanning using CSSN.They gave the sample code for another languages like C#,Delphi etc.(except PHP). Is there any sample code for scanning the document using PHP with this CSSN device?Whether we can develop application for this scanner using PHP?Thanks in advance. ...

constant vs properties in php ?

I just don't get it, class MyClass { const constant = 'constant value'; function showConstant() { echo self::constant . "\n"; } } class MyClass { public $constant = 'constant value'; function showConstant() { echo $this->constant . "\n"; } } Whats the main difference? Its just same as defin...

Entity Based Workflow

I want to design a workflow for my e document systems. Can any one provide some well explained text for Entity Based Workflow system? My app is being developed in PHP. Thanks. ...

cant undrstand the error :Access denied for user 'Pratik'@'localhost' (using password: NO) got in php

firstly i just clearify the problem. i am testing the page of login of my website. so i have two login files for testing that both contain same code but both are save in different place named "signin.php" & "login.php" resp. the problem is when i try to login from "signin.php" which located in root folder(www) gives an error:Access deni...

need to change the class of a table row when a checkbox is check the table is made dynamically using php and mysql

i need the tr to change background color, text color and have a line through the txt. To-Do Item Priority Due Date " value="checked" /> ...