php

upload progress bar.

Hi, I use php,jquery . I have a form where in a user uploads multiple files . when he cliks on submit . everything must get uploaded. and a progress bar must show how much of each image is uploaded. how do i do the progress bar thing for each image ? ...

Skype Phone Number Recognition

on browser phone number are showing with skype icon , I dont want that skype icon in hone number, I want to remove , is is possible through script.. I dont want to show skype icon any where , any system , is there any javascript or php function there.. Thanks ...

How can I run a doctrine 2 migration commandline without interaction?

How can I run a doctrine 2 migration command without interaction? Currently I have following command which runs on the setup of my Unit Tests. But It always prompt for a Yes/No user input, even when I use the --no-interaction option. $input = new Symfony\Components\Console\Input\ArrayInput( array( 'migrations:migrat...

can anybody explain ther 4 lines of php code I am so confused.

code- $res=$this->post("http://address.mail.yahoo.com/?_src=&amp;VPC=print",$post_elements); $emailA=array(); $bulk=array(); $res=str_replace(array(' ',' ',PHP_EOL,"\n","\r\n"),array('','','','',''),$res); preg_match_all("#\<tr class\=\"phead\"\>\<td colspan\=\"2\"\>(.+)\<\/tr\>(.+)\<div class\=\"first\"\>\<\/div\>\<...

Formatting HTML code to be output in plain text, with PHP

Hi folks I have this function that takes some user-submitted HTML code from the database: function Code($code) { return "<pre><code>".nl2br(htmlspecialchars($code))."</code></pre>"; } I'll just be calling it like echo code($query->row('html'));. I know my question lacks 'depth', but is this the best way to do it? Or could the out...

PHP find relevance

Hi, Say I have a collection of 100,000 articles across 10 different topics. I don't know which articles actually belong to which topic but I have the entire news article (can analyze them for keywords). I would like to group these articles according to their topics. Any idea how I would do that? Any engine (sphinx, lucene) is ok. ...

joomla component is not shown under component menu

hi, I made a component for Joomla manually and it's working ok with the direct url: http://www.something.com/index.php?option=com_pbform then i inserted it into database The problem is that i cannot find it under component menu. so please help about it ...

Execution of PDFTk from PHP script is failing with error code 11

I am trying to Fill in a PDF from PHP script. I am following the article by Sid Steward at the following URL. I have configured PDFTk package on CentOS linux distribution and I am able to execute the pdftk from the command prompt and it merges the FDF form with the PDF and successfully generates the flattened(Filled) PDF. I am using fol...

How To Get Client IP Address

I've tried to get the IP address of client browsing the site using $_SERVER['REMOTE_ADDR'], but I'm not getting the exact IP of the client please help me... Thanks ...

regex int + comma

Hi, i need a regex for: 123,456,789,123,4444,... basically comma separated values. The INT part can be 1-4 numbers long, followed by a comma...always in this form... /^([0-9]{1,4})(\,)?$/ This obviously doesn't work... Thanks! ...

Google Calendar

Hi All I have been messing about with google calendars and I think they have a good look and feel, so I MIGHT add one to my website. I just have some questions before I do. Can I set up the calendar to populate from a MYSQL datasource using PHP on my page? Does the calendar have to use an iframe? Can I force the calendar to use my St...

How to debug php scripts at server side? In a situation client page doesn't show response.

I'm currently testing a script on my host. This script is to accept PayPal IPN data, do a couple of things (ie. data verification), send necessary data to a specific email address, and more. I'm using a test tool on the PayPal site to post test data to my script. My script doesn't work: there should be a code issued but I can't see the ...

Using php,mysql to query two tables

My query look like this at the moment: $result = mysql_query("SELECT * FROM promo JOIN items ON promo.id = items.promo_id WHERE promo.id='$promo_id'") or die('Error : ' . mysql_error()); while($row = mysql_fetch_array($result)) { echo "<p>".$row['title']."</p>"; echo "<p>".$row['description']."</p>"; echo "<p>".$row['filen...

validating time and date fields .

hi, Is there any way to validate the time field based on the current time. I already posted a simillar question but now i decided to move away from that option and just want to try this. 1) ask an user to select time (I am using jquery timepicker). 2) See if that time is future time and not which is already gone. I also have a datepic...

PHP: How to make "Birthday"

Hello. So in my community I really want a birthday in the profiles, but I don't know how to do it. What I want to do is in the profiles theirs e.g "16" years old" if he chose in his settings: 1994-01-01, so like it counts out how old he is from the birthday he pickd in his settings. How should i do this? I started out with 3 select´s, ...

How do I work with PDT and WAMP

I have installed PDT for Eclipse and WAMP server. I want to know how do i start writing code in PHP now? What should I do so that WAMP gets all my PHP files? Thanks! ...

How can I recursively check an array of file include dependencies for other dependencies?

To explain my question, let me first point to this array: <?php $_depends = array( '/Scripting/jquery.hyponiqs/jquery.dropdown.js' => array( "/Scripting/jquery.externals/jquery.resize.js", "/Scripting/jquery.externals/jquery.topzindex.js", "/Scripting/jquery.externals/jquery.timers.js", "/Scripting/jq...

What is the optimal DB design for this type of data

I have a table of Users, Each USR_ID can have multiple Roles,Views,Brands and Units. So the optimal design I thought of is this: Users USR_ID USR_Username USR_Password Matrix M_ID M_USR_ID M_ROLE_ID M_VIEW_ID M_BRAND_ID M_UNIT_ID _ROLES ROLE_ID ROLE_Name ROLE_Active _VIEWS VIEW_ID VIEW_Name VIEW_Act...

PHP: Extending a class with an other namespace with the same ClassName

I'm trying to use namespaces. I want to extend a class inside a different namespace. The name of the class is the same. Example: Parent: namespace Base; class Section extends Skeleton { protected $id; protected $title; protected $stylesheet; } Child: namespace Base2; use \Base\Section; class Section extends \Base\Section {...

Getting 'attachments' out of MySQL BLOB fields, and into the filesystem

I have a standard LAMP server, and currently there is a way to attach/upload PDF's, or JPEG's with an inventory record. I designed this system way back in 1999/2000, and it has of course grown fairly large in size. The table that holds the attachments is approaching 10GB, which has made working with the data somewhat slow (especially w...