php

Retrieving values from a checkbox

Hi, I use a php checkbox and I want to retrieve marked values. My checkbox code : <label for="cours">Je suis intéressé par un ou plusieurs cours :</label><br><br> <input type="checkbox" name="cours" value="individuel">Individuel<br> <input type="checkbox" name="cours" value="semiprive">Semi-privé<br> <input type="checkbox" name="cours...

String to Array and Back : PHP

In PHP I have a string, how do I convert it to an array? After manipulating that array, how do I again make it into a string? Do strings in PHP behave the same way as in Java? is there a dupe for this? thanks in advance ...

Problem uploading multiple files

Here's the code I'm using. I can't seem to see where the problem is - its meant to upload multiple files at out ones. The funny thing is that some times it uploads just one file, and then won't upload anything. Can someone help me look into it please.. <pre><code> <?php /*** the upload directory ***/ $upload_dir= './uploads'; /*** nu...

Problem displaying the entire string in input box (in php)

I am trying to display a element from mysql table in a input box type=text. The data is a string value. But i can see only the first word of the entire string. but if i echo the element, i get the full string value. My code looks like this: echo "Title: <input type=\"text\" name=\"title\" value=".$row['Title']."></input><br>"; Pl...

Form Tricks

Basically two parts of the question. How to put explanatory text inside textboxes in a form (like writing e-mail in the text area of a text box in a form) with styles (i.e. greyed out so that meant to suggest) like on facebook homepage. How to put cursor focus on a particular form-field as soon as the page loads (like google sign-in or...

Opening, Rotating, and Storing Tiff Images In a MySQL Database Blob Column

My problem is rather straight-forward: Retrieve an image from a MySQL database (currently stored as binary data in a blob column) Rotate that image 90 degrees (using PHP's imagerotate) Store the image back in the database with that rotation changes applied. I'm having trouble finding functions that will let me save the image as a da...

PHP Time and Date

I have a database with dated articles. What I want to do is select articles between 2 dates - for example from 7 days ago to today. Can anybody help me. I have been trying to write a code for it but it hasn't worked for me. Thanks in advance ...

Update script stops randomly

I'm working on a one-time PHP (5.2.6) script that migrates several million of MySQL (5.0.45) database rows to another format in another table while keeping (a lot) of relevant data in memory for incremental calculations. The data is calculated incrementally. (in chunks of about 1000 lines) The script stops unexpectedly in random points ...

Is there a mod_top version for windows? if not is there an equivalent tool?

Does anyone know which version of mod_top I can use for windows server 2003? I want a performance monitoring tool for PHP based web application. thanks ...

Holding the session in Flex

I am getting the session generated in Flex Application in a hidden text field, but when i refresh the page it gets back me to login page... How can i hold the session of the page until the browser is not closed... I am getting the session value from PHP. ...

Are Javascript/Cookies enabled or disabled?

I am looking for some code that will return me values if the user has JavaScript enabled or disabled, as well as cookies. I know this is probably easy to do, but my time constraints are so tight, it hurts. There has to be something out there using php that does this. Ideally I would love to find code that has a page setup with all the...

Outer Variable Access in PHP Class

Consider the following situation file: ./include/functions/table-config.php containing: . . $tablePages = 'orweb_pages'; . . file: ./include/classes/uri-resolve.php containing: class URIResolve { . . var $category; . . function process_uri() { ... $this->category = $tablePages; ... } . . } file: ./settings.php containing: . . req...

Zend selects all columns

In the following code: $selectColumns= array('user_id.user_email', // inner join the data from user_id and user_details 'user_details.first_name', 'user_details.last_name'); $result = $handle->select()->from('user_id', $selectColumns) ->where('user_id.uid=?', $uid) ...

How to embed an XML loading .swf with a dynamic link

I could barely find a reasonable title that would explain my issue, let alone try and search for how to fix this. My issue : 1) User uploads a .zip with say: flash.swf images.xml image.jpgs 2) It gets extracted into a unique folder ID ex. /swfs/123456/ 3) Server tries to load the .swf in "index.php" and the .swf tries t...

Performance and bottle neck of Zend_Search_Lucene?

I've been using nutch for a while,untile recently that I know about this resort. How is its performance,and what's the file size limit it can support? Besides,how to delete or update an index instead of re-index each time there is a modification? ...

how to count space in a text statement in php

how can we count space between text in php ? example: hi how are you? spaces: 3 is there any way to count spaces ? Language : Only PHP ...

Actionscript [Error #2036: Load Never Completed] with dynamic generated images

I'm working with an image caching system that generates different images based on a url route. The source images live outside the document root and cached versions are added to /cache in the webroot. Long story short, in Flash, if I point a Loader to the route, I get a "Load Never Completed" error the first time (if the cached image has ...

User agents for mobile site, domain changing

I have a mobile site and I'd like to redirect users to the domain.mobi or mobile.subdomain (we have both setup) How do I determine a mobile browser Is it bad practice to have the mobile site on a different domain or subdomain? ...

Whats a good way about troubleshooting a script in terms of performance (php/mysql)?

I've written a site CMS from scratch, and now that the site is slowly starting to get traffic (30-40k/day) Im seeing the server load a lot higher than it should be. It hovers around 6-9 all the time, on a quad core machine with 8gb of ram. I've written scripts that performed beautifully on 400-500k/day sites, so I'd like to think Im not ...

PHP and Oracle using a thin driver

Is there a thin driver for Oracle available to be used with PHP (for example as an extension)? I cannot install the OCI driver/client, but need to be able to access an Oracle database. ...