php

in php how to create a tabbed window or page ,where in each tab i can disaply or do somr thing ...help me pls

in php how to create a tabbed window or page ,where in each tab i can display or do some thing ...help me pls...tab in the sense ...in a single page small pop up type in that tabbed menu bar like that am thinking to design ..pls help me... ...

Using nl2br and mysql_real_escape_string at same time.

Whats the correct way to use nl2br in the following way. I have post data that comes from a text area input $data = $_POST; $escaped_data = array(); foreach ($data as $key => $val) { $escaped_data[$key] = mysql_real_escape_string($val); } $desc = $escaped_data[description]; $desc = nl2br($desc); ...

How do I read a unicode url with PHP?

I have a unicode url: \test.php?sText=Московский I would like to use the $_Get function to work with the value of sText. The code I have for test.php is: <?php $sVar = $_GET['sText']; echo "Variable = $sVar"; ?> Problem is that the above is coming bach as: Variable = ?????????? What do I need to do? ...

Symbol in PHP I've never come across before

I probably should have, but I've never seen this before. Ran into it when looking over the documenation of a Smarty Plugin. $smarty =& new Smarty; The =& sign in particular. If you enter it in Google, it gets ignored, just like any other search engine. What is this used for? Same goes for this function signature: function connect(&$...

PHP: Read a variable at top present at bottom

Hello All, Is there a way to read a variable at top which is defined some where at the bottom. Here is an example of such situation: <!--this image is somewhere on top of the page--> <img src="/<?php print logoPath(); ?>" border="0" /> // this code is somewhere on bottom of the page $logo_query = "select logo_path from table where id ...

Counting an eliminating duplicate associative values in an array

I have the following issue, I have an array with the name $data Within this array I have something like [6] => Array ( [code] => 642 [total] => 1708 ) [7] => Array ( [code] => 642 [total] => 53 ) [8] => Array ( [code] => 642 ...

Zend_Form Over ridding default decorators.

Hi, I am having trouble over ridding the default set of decorators with Zend_Form. I am attempting to extend Zend_Form in order to implement a different decorator style. class CRM_Form extends Zend_Form { public function init() { $this->setDisableLoadDefaultDecorators(true); $this->addDecorator('FormElements') ->addDecorator(...

in php how to find already encrypted file in specific folder.

Hi, I am using PGP (GNU Privacy Guard) for encrypting the file. while encrypting i removed the '.pgp' extension of encrypted file. Now some how i want to know which file is already encrypted in the specific folder. Note :- my goal is that ... do not encrypt any file twice ... so before encrypt any file .. i want to check is the file ...

PHPExcel - Formatting gets lost when editing from code

Hi all, I'm playing around with an PHP - MS Excel integration these days. My task is to open an existing spreadsheet, add some data and save the filled spreadsheet as a new file. Basically sort of a template filling engine, eventhough xlsx files are used as templates. I looked into PHPExcel which seems to be fairly nice framework. In o...

Cannot populate form with ajax and populate jquery plugin

I'm trying to populate a form with jquery's populate plugin, but using $.ajax The idea is to retrieve data from my database according to the id in the links (ex of link: get_result_edit.php?id=34), reformulate it to json, return it to my page and fill up the form up with the populate plugin. But somehow i cannot get it to work. Any idea...

[AS2] Embedded SWF in Facebook with MochiAds Loader, access FB flashvars?

I have a flash game embedded on Facebook but need access to the flashvars facebook passes to all embedded games. However I am using the mochiads preloader meaning that _root.fb_sig_user is always undefined? How do I get to the variables? stage.loaderInfo.parameters.fb_sig_user Was my best guess and it doesn't seem to have worked. ...

php email function

One recipient: [email protected] mail("[email protected]", "Subject: $subject", $message, "From: $email" ); If I want two recipients, can I do this: [email protected] and [email protected] mail("[email protected]", "[email protected]", "Subject: $subject", $message, "From: $email" ); ...

Cannot iterate through object in Ubuntu PHP 5.2.10-2 Works on PHP 5.2.10?

With this code I am iterating through an object. Works: Windows with WAMP and PHP 5.2.9 Linux web server with PHP 5.2.10 It is not working on my desktop: Ubuntu 9.10 with PHP 5.2.10-2 from the repo's $incomingData = json_decode($_POST['data']); foreach($incomingData as $key => $action) { } Invalid argument supplied for ...

Curl and cookie

Hello! I'm using cURL to log in a website, but I don't know how to get/use the cookies I get. Does anybody has an idea? Thanks ...

How does Casting work in PHP?

What doesn't this work: (int)08 == (int)09==0 But this and this does? (int)07==7 (int)06==6 ...

Post a file to a .php page from Oracle

On my website I have a .php script to which our customers can post orders. $destname = CreateUniqueOrderFileName(); if (is_uploaded_file($_FILES['file']['tmp_name'])) { if (move_uploaded_file($_FILES['file']['tmp_name'], $destname)) echo "OK"; else echo "ERROR: move"; } So for my ...

How to bind SQL variables in Php?

How to bind SQL variables in Php? I want to bind variables instead of just building SQL strings. Anyway to do this in Php? either MySQL or PostgreSQL answers would help. Thanks ...

Suitable design for a database application

Hi, I have a question related to a web app that I developed in PHP, MYSQL. basically part 1 is : I display results in the form of table say for software testing. ID Prod_Name Set Date Result Platform 1 Alpha1 Pro1 01.01.01 PASS 2.3.1.2_OS Now, I have divided the tables accordingly Table Name: Result...

Forward to given URL string

Currently I'm creating a controller (ZendFramework) that gets from database an URL string by given id. /linker/show/id/6 I.e. id=6 /products/list/type/games. In LinkerController I would use _forward() method to pass also optional params (POST, GET), but this method takes parameters such like ($action, $controller, $module, $params) an...

Data storage in PHP Frameworks

Actually, I'm looking for a framework which helps me using a "Data Mapper" pattern. I have noticed that a lot of PHP framework propose an "Active Record" implementation... I found the "Active Record" too poor for managing "functional data"... It also seems simpler to handle "complex transactions" with this pattern, or to handle non-DBMS...