php

How to transfer object from one php file to another php file

hello, i have a query that, how can i transfer an object from php file A to php file B?. but i know a solution using session.But what i need to know is, is their any other method to transfer object between php files other than session? ...

Insert data into PDF, filled in an online form, on submit action .

Hi all, First of all my apologies to all the people who think this question is a repeated one or they find a similar question to this. I am working on a project in which I have an online form and some PDFs stored on the server. Functionality On the submit action I have to get the data from the form, fill it to the copy of PDF and fi...

PHP CLASS - public vs private

Possible Duplicate: What is the difference between a private and public function? what is diff between public class and private class ...

Problem with PHP session in Xampp

At it's simplest, if file_1.php contains <?php session_start(); $_SESSION["test_message"] = "Hello, world"; header("Location: http://localhost/file_2.php"); ?> and file_2.php contains <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> </head> <body> <?php if (!...

Dynamic access to a PHP array

Hello, I tried to access with $this->$arrDataName[$key] on the element with the key $key from the array $this->$arrDataName. But PHP interpretes that wrong. I tried it with { } around the $arrDataName to $this->{$arrDataName}[$key], but it doesn't work. On php.net I found an advice, but I can't realize it. In order to use variable...

PHP checkbox problem

I am going nuts here, I have an array of checkboxes from a form that I am trying to $_POST with PHP. EVERYTHING on my form posts fine except the check boxes. The checkboxes DO post, but in the wrong order. For instance when I want checkbox[0] and checkbox[2] I actually get checkbox[0] and checkbox[1]. I have tried many different ways...

Have trouble creating an hello-world module in drupal 5

Here're the steps I did to create an mudule: create a directory groups under sites/all/modules in the above directory groups, create two files groups.module and groups.info The content of groups.info: ; $Id: groups.info,v 1.3 2006/11/21 20:55:36 dries Exp $ name = groups description = Test Groups Listings. package = "test groups" v...

php array - upper case or lower case

Hi, does it matter whether an uppercase or lower case a is used for php arrays? ...

PHP code to convert PHP to JS

I need some PHP code to convert some PHP into JS. functionality - I'm using common PHP functions from php.js syntax - ??? The issue is converting the syntax. I don't need full PHP syntax, mind you; no need for supporting class definitions/declarations. Here's a small checklist of what needs conversion: "." should be "+" (string con...

Drupal Audio with Audio module or other

I tried the Audio module at http://www.drupal.org/project/audio but I'm looking for alternatives if better ones exist. My problem with the Audio module is that the current release (and the past 5 releases) seem to have all been released as unsable. The second problem is that the player itself that plays the audio is not showing when ...

Merging PHP arrays

I am working on a project at the moment, that allows the user to create any number of news headlines, articles and images, the only rule with this system is that a headline must have an article and an image. My question is on my form when I submit I get 2 arrays one is the $_POST and the other is $_FILES. $_POST Array ( [campaign_...

What smtp server (provider) should I use to send bulk emails? (5000+)

I am going to send emails to our users (5000+), but I'm not sure what's the best way to do it. To send single emails we have used google apps' smtp server, which allows 100/day (or 400 if you pay). We're using PHP and PHPMailer. 1) How does i.e. google react if i send thousands of emails from my own smtp server? Do they use blacklists ...

How to retrieve user info fra a Active Directory Security Group using LDAP and PHP

As you can see below I'm not getting any user info when I do a LDAP search to the security group. I want to use the $_SERVER[remote_user] to check if the user is a member of this group. I would also like to retrieve the info of this user and update the sql database with it. Is this possible? $dn = "CN=Intra,OU=Common Security Groups,DC...

Creating Unique Key in MySQL table referring to date

Greetings to all. Newbie here. Question on preventing duplicated entry in my simple web form. My table record user input from a web form, and distinguished by date e.g. DATE(). How to prevent user with the same name to enter information twice in a single date, e.g. same username cannot be entered twice in the same date, but can be enter...

PHP: readdir to scandir?

i wonder how i can transform exactly the following piece of code to scandir instead of readdir? $path = 'files'; //shuffle files $count = 0; if ($handle = opendir($path)) { $retval = array(); while (false !== ($file = readdir($handle))) { $ext = pathinfo($file, PATHINFO_EXTENSION); if ($file != '.' && $file != '...

Pass html variables to PHP using "ID" not "Name"

I have HTML code like below <input type = "textarea" id="sentence1"> Here is my sentence </textarea> <input type="hidden" name="sentence2" value="This is another sentence"> PHP: $_POST['sentence1'] //shows nothing $_POST['sentence2'] // works fine I want to get the value of sentence1 also But i have such a scattered code that for ...

Multiple MySQL/PHP Queries on one page, not playing fair!

Hey you guys n girls! I have the following MySQL Query: <div class="box" id="settlement1"> <? $query = "SELECT name, pub, hospital, trade FROM settlements WHERE settlementID = 1"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $settlem...

Doctrine cascade:[delete] does not call delete() method of related objects

I am using Doctrine 1.2 in my project. The schema.yml file contains: Campaign: tableName: campaign actAs: Timestampable: created: name: created_datetime type: timestamp format: Y-m-d H:i:s updated: disabled: true columns: id: type: integer(9) fixed: false unsign...

ReflectionClass cast to "normal" Class

Hello, I have a class TableData with two magic methods. One is the constructor and the other is the __call method. I have realized the invoke with following code: $class = new ReflectionClass('TableData'); $class->newInstanceArgs($parArray); It work great. But now I want to use my magic method. So I call $class->getData(), but it do...

convert SOAP struct to php class

how can i convert SOAP struct like <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/service1/"&gt; <xsd:complexType name="requestDescriptor"> <xsd:all> <xsd:element name="x" type="xsd:string"></xsd:element> <xsd:element name="xx" type="xsd:string"></xsd:ele...