php

PHP: Turn HTML table into spread sheet?

I am generating an HTML table full of data. They need it to be an editable spreadsheet though that they can save and edit. I currently have it exactly as they want but as an HTML table, is there anyway I can convert this to an excel spread sheet that they can download? Thanks!! ...

Using PHP, how do I FTP a file to a directory on the FTP server if I don't know if that directory already exists?

I have a web-application that allow users to upload images to my web site. What I want to do is instead of hosting those images myself, I want to push those images off to my CDN (Cachefly). Using PHP, I want to FTP an image from my server to another whenever a user uploads an image to my server. However, I want to maintain the file st...

best way to store images and then display them

Hi... I have a form that searches a mysql db for whatever the user is after, and returns the results on the same page in a div (using ajax then php to search mysql)... The results are ads, as cars for example, and I want each ad to have a unique image associated with it so that it displays the images next to the ads... Storing images ...

Joomla load script in a specific page

I'm creating a website in Joomla and wondering if there is a way to load a specific script in a specific page using php.... e.g. i want to load a : <script src="sample.js"> in the about us page where it is going to be use the reason why I wanted to do this is that instead of having them all load in head section even if it is not being...

php and mysql fuction snowballing results

Im using the following function. function GetSubmissions($coach){ $result = mysql_query("SELECT * FROM `ptable` WHERE coach = '$_SESSION[username]'") or trigger_error(mysql_error()); while($row = mysql_fetch_array($result)){ foreach($row AS $key => $value) { $row[$key] = stripslashes($value); } $id = $row['id']; ...

which editor is used in wordpress?

Hi guys, Which editor is used in wordpress? I need one editor something like wordpress used. Please give me some good editors. ...

Need Flash popup to redirect parent

I'm working on a project with a Flash object I have no control over, though I can get changes made by the developer. What needs to happen is for the Flash object to POST a value to a php file on my server, and upon a successful result, redirect the parent window to a new url, and then close the popup. It's POSTing correctly, but the re...

Search server for image and display it

Hi.. The user on my site can currently search a mysql db via PHP, and the results are displayed on the same page inside a DIV, thanks to ajax... What I need now is to display an image that is associated with the mysql results... Say the result has ID=250, then I want a piece of code to search in a folder for an image with the name 250....

Mysql Show Process - Sleep Commands and what to do..

I'm wondering if There is something that I can do to better get keep my process list clean when initiating commands with MySQL. Currently I have been seeing a lot of: 17325 user_a localhost db_1 Sleep 1132 NULL 17464 user_a localhost db_1 Sleep 1124 NULL 17983 user_a localhost db_1 Sleep 1078 NULL ...

Facebook Connect - Using both FBML and PHP Client

I am doing my second Facebook connect site. On my first site, I used the facebook coonect FBML to sign a user in, then I could access other information via the PHP Client. With this site, using the same exact code, it doesn't seem to be working. I'd like someone to be able to sign in using the Facebook button: <fb:login-button length...

PHP: How to embed image in an excel column generated from PHP?

I am echoing TSV data and turning it into an excel file via header() This works fine, but 1 of the columns needs to be an image. How can I embed the image as one of the columns? Thanks! ...

conditional operator shortcut in PHP?

Does anybody know if there is a shortcut for the following statement in PHP? $output = isset($some_value) ? $some_value : "Some Value Not Set"; echo $output; This something that I often run into, where $some_value is actually very long and possibly involves a function, such as: $output = $this->db->get_where('my_db',array('id'=>$id))...

Ajax - loadable php-script

Hello, I'm dynamically loading different content from db, using ajax. So, when I'm loading plain text - it shows correctly, but when there is a php-script in content, it wouldn't be interpreted by php-server, so I can see a code at the page. Could I load php script like this way? ...

Web Development: How can I allow a user to upload files directly to my CDN (Cachefly)?

I have a PHP web-application that allows users to upload images to my web site. I'm doing this using a simply HTML <form enctype="multipart/form-data"> However, instead of having those images uploaded to my web server - I would to have those images uploaded directly to my CDN (Cachefly - which is another server). Is this possible ... t...

Zend_Tool: Fatal error: Cannot redeclare class Zend_Loader

I am able to create new projects with... zf create project ProjectName ...but this creates a project without copying the Zend Framework library. So I copy ZF into my project library and try to create a controller... zf create controller auth ...and I get this message: Fatal error: Cannot redeclare class Zend_Loader in /home/andrew...

Cannot execute zip task in Phing on XP

Hi - I'm using Phing to create build files, but I've noticed that it does not appear to be able to execute the zip task: <target name="makeroot"> <echo msg="Making directory Template" /> <mkdir dir="./../Template" /> </target> <target name="makefolders" depends="makeroot"> <echo msg="Making folders within Template" /> ...

optimum setup for php server

We have a number of servers running various different LAMP setups. One thing that seems to be different depending on who set the server up is the way PHP is configured. Some are set up to use the Apache DSO module, others are setup to use CGI. Some have suEXEC turned on, other servers its turned off. We are always trying to tweak our app...

php suddenly very very very slow

I'm working on a webapp using php, apache en mysql. For the past year the response times of this application have been good. Suddenly yesterday the application became very slow on firefox (complete page load, including css and js files: around 20 secs. During page load firefox is completely unusable). Interestingly the responsetimes in I...

PHP: How do I find out if someone is from the US from his/her IP Address?

I don't want anything incredibly complicated. I am working on a client outside the US, and I just want a basic check to see if someone is accessing his page from the US or not. After that, I am going to default the language in either English or Spanish, after determining where the visitor is from. Thanks. ...

Proper way of dealing with views in PHP

In the past, I've been creating my apps with basically a view (i.e. search.php or display.php) and a large file with a bunch of functions (i.e. library.php). I intend to change all this by going the MVC route w/o a framework. I just don't have time to learn a new framework, I want to get this done and do my best to separate the php code ...