php

Providing customizable forms to non-technical users

I'm curious how others have offered customizable forms to their website's users (who are primarily non-technical). It is possible that there is a library out there that achieves this, but I have not seen one. Some of the concerns are: Options for each form element What kind of options to provide to the user, keeping in mind that all o...

How to do monthly refresh of large DB tables without interrupting user access to them

Hi all, I have four DB tables in an Oracle database that need to be rewritten/refreshed every week or every month. I am writing this script in PHP using the standard OCI functions, that will read new data in from XML and refresh these four tables. The four tables have the following properties TABLE A - up to 2mil rows, one primary k...

Implementing a fully-functional prototype for a web-based application

I am building a prototype for a web-based application and was considering building the front-end in HTML, which can then be reused later for the actual application. I had done a Flash-based prototype earlier, which embedded the .swf into a C# executable. Flash made for rapid turnaround time while the Windows application provided unlimite...

How to let users add object tags in FCK editor?

I am using FCK editor, and allowing object tags to be entered... however, the only way to do this seems to be for the users to enter the tags in the SOURCE section... most users aren't so hot at techy stuff like that... ...

Are there any security vulnerabilities in this PHP registration code?

Can you experts give me some thougths on this code? Some security hole i have missed? Can you see any potential threats? Something i can do better? I'm still learning :) Thanks <?php if (isset($_POST['username'])) { $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $pa...

Get random number that does/doesn't match criteria (PHP)

Using PHP (other languages, using common built-ins are welcome), how can I get a random (or pseudo-random) number that does NOT match a certain criteria? IE: I want $x = rand(0, 99) but only if ($x % 9) != 0. What is a clean acceptable way to constrain random numbers to a criteria like that? As an example, using a while() loop, and p...

How do I ensure the British Pound Sterling Sign (£) appears correctly?

I have a PHP script that reads in data from an XML file, returns it via AJAX to a page which then places the data in to the relevant text area. The Content-Type of the page is as follows: <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> The XML heading looks like this: <?xml version="1.0" encoding="UTF-8"?> <!D...

Control not entering into PHP Class File : ERROR

consider the following file (db-com.php): If you wish You may skip to the question below it directly while reading it in parallel. echo "entered db-com.php"; class DBCom { /** * @var string Holds the query string. * If the blank constructor is used, make sure to use the parametrized functions. */ var $queryStrin...

Scribd API - is this possible?

Hello all, Scribd API: http://www.scribd.com/developers For those of you that are aware of Scribd, used it or can take a look at the API above. Can anyone tell me if it is possible to upload documents from my site straight to scribd? I ask because from the API (PHP Implementation) it seems that I have to first ask my users to uploa...

AD via LDAP - How can I return all ancestor groups from a query?

I am querying Active Directory via LDAP (from Java and PHP) to build a list of all groups that a user is a member of. This list must contain all least all groups (organizational-units optional) that contain groups the user is directly a member of. For example: User1 is a member of GroupA, GroupB, and GroupC. GroupA is a member of Group...

Is there a good alternative to PHP's SOAP extension?

I have a project which relies heavily on PHP's SOAP extension. It's great, and works wonderfully. However, I have to deploy a version of the software on a server that does NOT have the extension (it is PHP5 though). At this time, changing hosts is not an option; and it looks like installing the extension is also not an option. Is there...

How to: URL re-writing in PHP ?

I am trying to implement URL rewriting in my PHP application. Can someone share a step by step procedure of implementing URL rewriting in PHP - MYSQL. In my application I want to implement following URL rewriting, I want to redirect 1. http://example.com/videos/play/google-io-2009-wave-intro 2. http://example.com/videos/play/203/googl...

Problem with Strpos In PHP

Hey Folks I'm writing a simple function and for some reason(probably a simple one) it's not working for me and I was wondering if you guys could help me out. function check_value($postID) { $ID = $postID; $cookie = $_COOKIE['list_of_IDS']; $position = strpos($cookie,$ID); echo 'ID:'.$ID.'-Cookie:'.$cookie; ...

SVN Website Development and Deployment Solution

Here is the situation: we have multiple developers with varying degrees of commandline experience and we are putting together a deployment solution for our websites. The production environment is 2 SUSE Linux boxes. The development environment is a SUSE Linux box as well. Each developer has/will have a copy of the SVN tree in their h...

What is the purpose of $_POST?

I know it is php global variable but I'm not sure, what it do? I also read from official php site, but did not understand. ...

Pages with level

Hello guys, sorry if you'll find this question stupid, but I really need help. Here's some info about it. Database structure id | parent_id | level | name 1 | 0 | 1 | Home page 2 | 1 | 2 | Child of homepage 3 | 1 | 2 | Another child of homepage 4 | 2 | 3 | Sub child of page id 2...

I am stuck with php array()?

Does anybody have an idea why following array() is passing into function. I am not able to understand the array() function. I know, if $_POST dont have any value, it will pass array(). but what are the value in array()? SomeFunction($_POST ? $_POST : array()); ...

Fix file endcoding when downloading a file from Linux to Windows in php

Ok I have an issue. I have a linix web server (RHEL 4 with apache 2) that is used to house an application. Part of this application is a set of php scripts. I created a script that accepts some form variables and then downloads a file to the user. Here si the code: header('Content-Description: File Transfer'); header('Content-Type: ...

how do i write this out in php? (where i would use the >> to print out content)

i remember a while ago i used a method like this to print out content so i didnt have to use slashes every time i had to use a quotation. >> some text here "and more text something; what was that called? and how did it look thanks this im gonna write down :p ...

Adsense doesn't seem to recognize PHP-generated content

Hello, My site is using PHP to pull content from a database. I am running a Google Adsense ad alongside this content. The first time I pull data from the database, Adsense doesn't appear to recognize the subject of the content and displays a very generic, unrelated ad. Any ideas on how I can get Adsense to recognize the subject of th...