php

How can I add a search feature to a website that returns images?

Hello, I need to add a search feature to a website. Not being adept at PERL or PHP, I was thinking of adding a remotely hosted search CGI (like freefind or fusionbot). Alternately, I might end up trying to convert the HTML site to a Wordpress site (as I think I may be able to add a search function relatively easily once that is achiev...

using php to download files, not working on large files?

Hi all, I'm using php to download files, rather than the file itself opening in a new window. It seems to work ok for smaller files, but does not work for large files (I need this to work on very large files). Here's the code I have to download the file: function downloadFile($file) { if (file_exists($file)) { /...

How to create a local checkboxes by jquery?

example is : But example is php,I dont't understand php how to use. Who can tell me html+jquery how to write? ...

Can I log users logins when using openID

I'm setting up a login system for a site and someone suggested using openID instead. In my current setup, I log users' login attempts into a db table. When using openID, would I still be able to have that fine-grained control or not? ...

PHP-MySQL query -- Please explain

Ran across this, but I cannot quite grasp it, especially beginning with the LIMIT phrase. Thanks for any help. $sql = sprintf ("SELECT * FROM $tbl_name WHERE title LIKE '%s' OR description LIKE '%s' LIMIT $start, $limit", mysql_real_escape_string('%'....

php 5.3 and APC (what's going on)?

I am trying to get a version of APC that works with PHP 5.3.x According to several online resources including wikipedia, the version of APC given as compatible with PHP 5.3.x is APC-3.1.3p1 However upon investigating the contents of the file, in the file named INSTALL The first few lines declare: Installation Instructions for APC ...

Recording logins for password protected directories

I have a folder in the webroot at http://somesite.com/folder which I'm password protecting with the directory password protection feature in cpanel which I guess uses some form of htacccess. So it's not protected with a normal login system that's connected to a database that I can check against. Once a correct username and password is ...

keep div floating to the left if browser window gets smaller

Hi, I am trying to make some sort of timeline, but I can not keep the div floating horizontally. I have a div container with overflow hidden. Inside the container I have divs floating to the left. Inside those div's are ul's with a fixed width. If I resize the browser, I want the div to be gracefully cut off from the right side. The ...

trying to wite js makes whole page go blank

hi, thanks for looking, when i use document.write, the whole pages goes blank and only displays the ad. function __adthis(id) { $.getJSON('banner.php', function (data) { var adNum = Math.floor(Math.random() * data.ban.length); document.write("<SCRIPT TYPE='text/javascript'> SRC='+data.ban[0].link+'><\/SCRIPT>"); ...

Bulk Image Resizing with PHP and ImageMagick

Hello All, In the early days of my site, I allowed people to upload any size image they wanted. I now have client and server side config to limit new images to 2000px max, while maintaiing the origional ratio. So from the old config I have a heap of directories with large images that I need to scale down, I would like to do this on the...

very simple OOP question

Hi folks, Hopefully a quick and easy clarification only...With this code found in an action in a controller: ... $SaveAccount = new SaveAccount(); $SaveAccount->saveAccount($username, $password, $email); ... Does the second line mean "run the method "saveAccount()" on the new object? Is that what the -> means? Thanks! ...

Formatting String into MYSQL time

Ok, So i have a script that reads in a csv file and in there is a time that is formatted in the traditional HH:MM am/pm. I need to convert that into the mysql standard time format (HH:MM:SS). This is what i have so far and it works $schedule[$row]["TIME"] = date("H:i:s", strtotime($data[4])) the problem is, if the input is formatted...

How about failed attempts for htaccess password protected directories

This question is related to a previous question I asked, but it's a different. I'm using htaccess to control login to http://somesite.com/folder. Once logged in, I have php code in folder/index.php to check the username and password used to login: $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']. I log that info to a database. ...

What do the '&=' and '=&' operators do? [PHP]

Finding the answer to this is turning out to be much more difficult than I would have thought. Since I don't have a clue what you'd call this, it's hard to run a Google search since it will ignore those characters. I tried browsing the PHP Assignment Operators page, and even the other operators pages, and found nothing that told me exact...

Destroy php session on page leaving

Dear all, I need to destroy a session when user leave from a particular page.I use session_destroy() on the end of the page but its not feasible for me.Because my page has pagination.Let my page is: abc.php?page=1 or abc.php?page=2 or abc.php?page=3. So, I need to destroy a session when a user leave from abc.php page.How can i do it wi...

PHP echo issue while in a while loop

I read in a csv file by using a while loop: while (($data = fgetcsv($handle, null, ",")) !== FALSE) and i want to skip the first row because this is the title row and i want to display on the screen "first line skipped". if($data[0]=="title") echo "Title row..skipping<br />"; else //do stuff The problem is since its in a while ...

jQuery uploadify I/O error UNIX

Hi, I've a problem with jQuery uploadify script and I didn't found any solution. I've integrated this script on my project and everything is working fine on a Windows server(localhost) but when I try to run it on an UNIX server and I/O error is risen. This only happens when I try to upload a file that already exists on uploading folder...

ERROR! Message when submitting simple e-mail form. (PHP)

Hi All I just purchased a website template from DreamTemplate.com, and have tried to send a test e-mail from it online and instead of sending the e-mail it just comes up with red text saying: "ERROR!". I am not very familiar with PHP, but I can understand the syntax. The code is below: Contact.html <script type="text/javascript"> // ...

PHP - protecting code

Possible Duplicates: How to protect your software code? Protect my PHP App Hi, I have a framework that I am wanting to be able to sell licenses for. I want people to be able to edit the code if they choose to (to a degree) but also I want to try and stop someone paying for the code and then just putting it up for download. ...

How to save PHP HTTP_USER_AGENT to MySQL field

I have a simple feedback form PHP script that I would like to enhance by adding the $_SERVER[HTTP_USER_AGENT] data to the row in the database that I'm saving. I keep getting parse errors when I try a simple insert, passing '$_SERVER[HTTP_USER_AGENT]' as a typical string. Should I bundle it in some way, so that the characters used in tha...