php

Want to retrieve data from database using Flex+Cairngorm framework..

Hi.. I am new to cairngorm framework.. I need to retrieve the table data to flex UI using Flex + Cairngorm and PHP + MYSQL.. I got it using Flex alone using xml + PHP + MYSQL.. But in this case, i can't get the table data values.. Need a sample application with source code.. Help me.. Please.. Thanks in advance.. ...

how to fetch data from multiple tables MySQL

hi all, I am looking some help in php+MySQL+jquery I have 2 tables table1 table 1 have 4 colume (id, title, desc, thumb_img) tabel2 table 2 have 3 colume(id, table1id, img) I just want to compare 2 table with the value of $_get['QS']; and show the records from both (title, desc, img) Looking forward for the help.:) ...

How to detect the MAC address of the user viewing our website using PHP?

I know how to track down an IP address, but I need to track down the MAC address of the users viewing my page. How to accomplish this? ...

How to add a method to an existing class in PHP?

I'm using WordPress as a CMS, and I want to extend one of its classes without having to inherit from another class; i.e. I simply want to "add" more methods to that class: class A { function do_a() { echo 'a'; } } then: function insert_this_function_into_class_A() { echo 'b'; } (some way of inserting the latter ...

using htaccess to redirect certain requests to a php file along with variables

Im trying to find how to take a page request such as http://www.domain.com/sam/?dog=woof&cat=meow and send it to http://www.domain.com/animals.php?dog=woof&cat=meow Ive tried a few things ive found on here, or i adapted them i should say, but i keep getting either nothing, or infinite loops. Any ideas? UPDATE this is the htac...

Should I upgrade my server's PHP to version 5.3?

I have php 5.2.11 on my server. Should I upgrade to the new PHP 5.3.2? Any new features which can save my life? Any suggesstions? ...

How to avoid black background when rotating an image 45 degree using PHP?

Hi I have to flip a thumpnail image before merge it with another jpeg file. but when I rotate 45 degree using php. It shows a black background. how can I avoid that. any body can help me. ...

Securing Plugin Data in WordPress From Access by Other Plugins?

There probably is some solution to this, whether it involves code running on just the wordpress installation or a combination of a wordpress installation and a master server I am not sure yet, but please remember not to have tunnel vision and consider any and all possible solutions: The scenario is this: A WordPress plugin (plugin-A) th...

Zend Tutorial for newcomers

Is there any good tutorial for zend except the official zend tutorial at http://framework.zend.com/manual/en/. The zend official tutorial is very scattered and not very much helpful for newcomers. ...

Is it possible to see the different parts of file in Zend Studio 7?

Hi; I want to know that, if is it possible to see the different parts of a file at the same time in Zend Studio 7? Maybe in different windows or something like that. I know this can be succeeded with simpler editors like editPlus tHanks ...

Magento hiding all errors page.

Magento Production version 1.2.1 store running on linux centos. I want to hide all error messages generating from Magento, or if error occurred then I want user to send to custom error page. I tried some solutions like putting Mage::setIsDeveloperMode(true); in index.php but it is not working properly, I even tried to set ini_set('d...

PHP Security best practices

I have implemented a project on PHP/MYSQL now i needs to secure my project, please let me know the security issues and how to tackle in PHP ...

data in mysql show after barcode split and matches character

i need some code for the next step..this my first step: <script> $("#mod").change(function() { var barcode; barCode=$("#mod").val(); var data=barCode.split(" "); $("#mod").val(data[0]); $("#seri").val(data[1]); var str=data[0]; var matches=str.matches(/EE|[EJU]).*(D)/i); ...

How to set cookies via PHP in the middle of a document?

Hi all, how can I set cookies in the middle of a document, without incurring a 'headers already sent' error? What I'm trying to do is make a log out script (the log in cookie setting works...so odd. Is it because it's enclosed in an if statement?) however I've already echoed the page title and some other stuff at the top of the page, bef...

how to achieve functionality of #def of c in PHP

Well, I don't know if thats what I want. But here is my problem: In case of some error I am logging the FILE, CLASS, FUNCTION and LINE in a file. For that I am doing something like: myLog('['. __FILE__ . ']' . '[' . __CLASS__ . ']' . '[' . __FUNCTION__ . ']' . '[' . __LINE__ . ']'); The problem is everywhere I've to repeat that code...

Example of forum in Object Oriented PHP

Hello, I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly (the closest to what I want to do). I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented. Do you know any ? Tha...

PHP classes totally forgotten something today - sorry

Hi guys, really sorry about being "totally thick today" but I have forgotten how to do something simple - too much time not in php recently. Want to use the OS phpapi How do I print out the individual rows - see told you I was being thick today // The fields we will be fetching. if (isset($_GET['test']) && $_GET['test'] == 'plaxo'...

Cannot connect using WebSockets, not changing readyState

Ive tried several approaches and even copy/pasted from http://code.google.com/p/phpwebsocket/ Im using Google Chrome 5.0.375.70 beta and the error is always the same: Error: INVALID_STATE_ERR: DOM Exception 11 when debugging I see the readyState is always 0 (connecting), no other error is shown. Any ideas? ...

Dependency Injection and Unit of Work pattern

I have a dilemma. I've used DI (read: factory) to provide core components for a homebrew ORM. The container provides database connections, DAO's,Mappers and their resultant Domain Objects on request. Here's a basic outline of the Mappers and Domain Object classes class Mapper{ public function __constructor($DAO){ $this->D...

can some one give me a sample gzip code for htaccess?

I'm keen to get started experimenting with gzip, but like i used to find php.net when i first started learning php, the apache documentation confuses me a bit. http://httpd.apache.org/docs/2.0/mod/mod_deflate.html I'd really appreciate a sample htaccess file to have a look at if anyone's got one? Also are there things which should be c...