php

How do I improve my programming skills as a PHP programmer?

What would you guys suggest that I do to improve my skills as a PHP programmer? I want to develop high quality web apps and I chose PHP programming as my niche. I want to really hone my skills to be one of the best. What do you think I should do? ...

How to use preg_match to test for spaces?

How would i use the php function preg_match() to test a string to see if any spaces exist? example "this sentence would be tested true for spaces" "thisOneWouldTestFalse" ...

Can someone help with how to save a display.php page?

I will do my best to explain my situation and what I have done so far. I am new to php and have tried to learn everything from the net and the forums, but now I must post in one. I have a form that is comprised of two pages input.html and output.php. The user completes the form (input.html) and submits it. They are presented with a f...

OpenID. How do you logout.

On a website I have implemented the login using OpenID (based on StackOverflow). But I can't seem to logout. On my host I can logout but when the user tries to login again (especially with google) the authentication goes through without requiring the user to type in name and password. How can I indicate to the OpenID Provider that a us...

Installing PHP in IIS 5.1

I know there have been some similar questions to this, but they haven't helped me. I'm trying to install Wordpress 2.8.4 on my XP box, with IIS 5.1. I installed MySQL, and found that it was possible to install Wordpress through the Microsoft Web Platform Installer. After installing Wordpress (the install worked fine), I proceeded to the...

How do I remove a self referencing n:n relation in Doctrine?

I'd like to represent e friend relationship between two users in Doctrine. I am able to create the relationship, but I don't know what's the best way to delete it. I have the following schema: User: columns: name: string(255) relations: Friends: class: User local: user1 foreign: user2 refClass: Frien...

Is it possible to use Zope object database from PHP ?

as from Title. ...

Drupal 6: custom profile fields and saving data to a DB

So i've added several some custom profile fields (administer -> profiles) which is all fine but completely useless if I can't store the information in a database. I've been searching for hours now trying to figure out the "best practices" way for doing this with very little luck. Do I add the new columns to the Users table? Do I create...

What are differences between PECL and PEAR?

I can see that GD library is for images. But I can't see differences between PECL and PEAR. Both have authentication. What are the main differences between two? Why don't they combine them? ...

PHP / regular expression matching

I've got a piece of text that contains another regular expression. Sample text: ...<rege>!^.*$!mailto:[email protected]!</rege>... What I want to match is: mailto:[email protected] This didn't work: $patterns[] = '/<rege>!\^\.\*\$!(.*)!<\/rege>/'; Thoughts? ...

Upload image using Amazon S3

Hi, I need to upload a given image using Amazon S3 I have this PHP: <? $uploaddir = 'images/'; $file = basename($_FILES['userfile']['name']); $uploadfile = $uploaddir . $file; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "Data Uploaded Successfully"; } else { echo "ERROR"; } ?> but it gives me...

Downloading images from a server iPhone SDK

I have created a program which allows me to upload images to my server. They are given a random file name when uploaded. I want to be able to download all the images from a folder on the server so I can display them in my application. The only example I have seen requires that I know the file name of the images which I don't. How could I...

Multi-tier applications with PHP?

Hi all, I am relatively new to PHP, but experienced Java programmer in complex enterprise environments with SOA architecture and multitier applications. There, we'd normally implement business applications with business logic on the middle tier. I am programming an alternative currency system, which should be easy deployable and custom...

Error using PEAR

I am learning PHP PEAR and testing the following code. However when I login, I get the following error. Could anyone tell me what is wrong with the code? ++++++++++++++++ Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in C:\xampp\php\PEAR\Auth.php on line 830 War...

How to highlight div using javascript or jquery

Hi folks.. I spent about hour and did not find any clue how to highlight my div. Ok example my code. 1.proccess.php $_SESSION['msg']='<div class="success">Your account has been updated</div>'; header("location:http://domain.com/account.php/"); 2.account.php if ($_SESSION['msg']!="") { echo $_SESSION['msg']; unset($_SESSION['msg']);...

accessing my gmail inbox via php code

how i can access my gmail account through my php code? I need to get the subject and the from address to from my gmail account.And then i need to mark the accessed as read on gmail Should i use gmail pop3 clint?is that any framework that i can use for accessing gmail pop3 server. ...

What is the most efficent way of updating an "order" column in MySQL via PHP.

I'm currently creating a Flash CMS via Flex and the Zend Framework. In the Flex interface, I have a list of drag-able items pulled from a MySQL database via the Zend Framework. The user can rearrange the items by dragging and dropping them which will change their order in the mapped Flex array. Back on the server I have a column in my ...

how can i get the day of a specific date in php?

For example I want to get the day (Sunday, Monday,...) of October 22. How can i do that? ...

Best way to integrate PHP with asp.net / asp.net-mvc

By some coincidence this problem has come up twice in the last week. A customer has an existing PHP web site which they want to keep. They also have or will soon have some ASP.net web pages that they wish to integrate into the existing site, in a way that it appears as a single site. We have though of the following possibilities: Use...

Php without start/end tags?

Is it possible to have php not to require the begin/end tags (<?php ?>) for some of the files? The code should be interpreted as php by default. I'm aware that I can leave out the end tag (?>). ...