php

Receive A File Via PHP Web Service

I'm busy writing a PHP webservice and wish to receive a file as an array of byte streams (you can do something similar using C#) how can I do this in PHP? Using PHP 5 with NuSOAP. ...

Fatal Error while creating a shell which should connect to the database

Fatal error: Call to undefined function mysql_connect() in /opt/lampp/htdocs/cake/cake/libs/model/datasources/dbo/dbo_mysql.php on line 370 //shell <?php class ReportShell extends Shell { var $uses = array('Customer'); function main() { $customers = $this->Customer->find('all'); var_dump($customers);...

Tricky pattern match

This could be tricky, easy or impossible... I'm not sure I have a list of domains and I'm trying to match them as closely as possible to the website name in the "title" tag. For example... Domain: www.yahoo.com Title: Yahoo! Result: Yahoo! Domain: www.thegreenpages.com Title: Welcome to The Green Pages. Result: The Green Pages Do...

Easiest way to implement an online order tracking database

I've been asked by a client to make an online tracking system for work we do for them (we will be typesetting a high volume of books for this client). Basically, it would be a database showing the books we are currently working on, with information on what stage of the project we are at, and estimated completion dates. The only people wi...

Php Gd rotate image

HEllo, I am trying to rotate a circular image around the center and then cut off the sides. I see the imagerotate function, but it does not seem to rotate about centre. Anyone have any suggestions? Thank you. Update: Since it is a circle, I want to cut off the edges and keep my circle in the same dimensions. ...

Class Diagram or Object Diagram for Zend framework Gdata

I am looking for a Class Diagram for Zend Gdata. Zend_Gdata_Spreadsheets_SpreadsheetEntry object I would like to know if there is a Class Diagram or is it called an Object Diagram, for this is. ...

Open Id XRDS Discovery

I am working with Open Id, just playing around making a class to interact / auth Open Id's on my site (in PHP). I know there are a few other Libraries (like RPX), but I want to use my own (its good to keep help better understand the protocol and whether its right for me). The question I have relates to the Open Id discovery sequence. Ba...

How i can import a file(csv/excel) with partial data to table in database through phpmyadmin?

I needed from my client updated information to fill a clients table. I exported the table that i wanted to an excel file, and asked them to fill with the new information (it was only a column that i needed updated) and they've sent me back the file. Now I want to import that information back to my table column. Trial and error many tim...

Making life better by not using Java web frameworks?

I'm so tired of having to learn yet another Java web framework every other day. JSP, Struts, Wicket, JSF, JBoss Seam, Spring MVC to name just a few - all this countless frameworks out there try to address the same issues. However, none of them really solves the fundamental problems - that's why there are still coming up more and more new...

Zend Framework: Fatal error when trying to use Zend Mail Transport to send multiple emails with attachments

I don't totally understand how all this works, but I'm getting this error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 261858 bytes) in /Users/andrew/Sites/myApp/library/Zend/Mail/Transport/Smtp.php on line 213 I'm running this code locally on my Mac running MAMP. Not sure if that has anything to do w...

PHP Get the last insert id from ODBC connection.

How do I get the last insert id from a database using a ODBC connection? I'm looking for a solution similar to the mysql_insert_id() function. ...

PHP: How can I find out the date of the day before a date?

I have a system that compares fiscal year up to the current date to the same date range of the year before. You can adjust the year and month to look at and it always compares the same date range to the year previous. I have it set so if the current day is leap day it compares to the 28th of last year, and if last year was leap year and ...

How can I insert links into swf files using PHP?

I am trying to insert links into a swf banner(on all its surface) automatically using php. I am almost sure I saw this feature in OpenAds... ...

PHP array binding on Oracle PL/SQL call

I have a PL/SQL procedure that takes as input parameter a TABLE OF TYPE NUMBER(10). I'am trying to call it from php right now. The binding doesn't rise any error, everything is fine. But the content of my binding is not the one I expected! For example I bind an array: array(19465,19467) On the pl/sql side I get this kind of values: -2....

PHP Repeating Region and Checkboxes.

--Edited for clarity. Database: tblModule, contains a list of modules that can be enabled or disabled. tblData, contains a list of trusts and the modules they have enabled. This links to tblModule on tblData.M01 = tblModule.mod_key The PHP page is accessed from an index page and passes a variable lstModTrust to this page, to limit t...

what's wrong with this sql query?

Okay I have two variables in PHP $username; $password; which are initialized to the data retrieved from $_POST variable :) I have this SQL query $sql = "SELECT * FROM users WHERE username = '" . $username . "' AND password = '" . $password . "')"; But this doesn't works and returns me nothing :( Can you instruct me into the right...

PHP & Mysql updating many to many relationship with checkbox form

I have a many to many table structure and updating checkbox forms. The goal is to relate the users table to the projects table with the users_project table. This way there can be many users per project and many projects per user. The form would on each user edit page would look something like this <form action="#" method="post"> <...

checking if a class is instance of another

i want to check if a class is an instance of another without creating an instance. i have a class that receives as a parameter a class name, and as a part of the validation process, i want to check if its of a specific class family (to prevent security issues an such). any good way of doing this? ...

jqGrid, rowedit, php posts names instead of values to the db

Hello: I need to dynamically edit and change the server data. http://pssnet.com/~devone/ajqtable/editgrid2.html Right now, when the fields get edited php posts names instead of values to the db. My assumption is that on submit, the editurl will be called upon with the changed data. I read in the docs that I may have to add an onSubmit...

SSL to log in, regular http after that... how vulnerable is the data transferred from the database?

Hi all, I roamed the site for this question using the search engine, and I don't think it's out there. If it is, apologies in advance and feel free to point me to it. Here is my scenario: I am setting up a web application, Moodle if anyone is familiar with it, with Apache, MySQL, and php on Windows. Moodle supports enabling SSL for ...