Hi,
I have a CakePHP application that allows a user to register and post projects. At some point whilst I have been tinkering with it I have managed to change the way the current date is captured when the user record is created :( when a new user account is created the date is defaulted to
Jan 19th 1970, 01:00
Here is my register ac...
I have an application that allows users to create forms and assign validation to each field (think http://www.phpform.org/ or http://wufoo.com/). I can easily get each field’s name and label from the database, as well as the array of associated validation rules.
Say, for example, I wanted to apply a blanket rule of “required” for all of...
hi very good,
I want to summarize what I send the image, ie the input file, does not reach the addimagen.php file, and sure it's a javascript problem, because with php alone, if you do it right.
I would like to know because I sent all the information I have the form, I have been doing some checks and not sending me and why it shows me ...
Hi all.
Straight to the point:
I've got two singleton classes, both inheriting their singleton nature from a super-class. I initialize some properties on the first singleton, and then have the second singleton retrieve the instance of the first one. That instance, however, does not seem to be the one I initialized in the first place. So...
Is it possible to force an error state to return to an ajax request from a php script.
I am handling the success and error states in an ajax request and i want a way to force the error. The error only seems to be triggered b y xhttp error and i want to trigger this when a condition is not met at the server. Its seems confusing to have...
I have a search page.
On clicking search it will show a jquery modal with processing image and redirect to results page.
I have download functionality also in the search page.If i select download option,
the result may vary to 1 kb to 25 mb , and i cant put a timer to close the modal window.
Is there any way to find the download is...
A possibly "silly" question.
Would I possibly run into any problems (incompatibilities) deploying eg.: on Centos/Apache (php5/MySQL5) a project developed on Win desktop (WAMP/XAMPP - php5/MySQL5).
I found some answer: here on Stack.
But it does not address all my concerns.
If I missed any thread - I appreciate a link.
...
Hello,
I'm trying to make a data filter with php and to do so, I want to use a form with 'get' method. Not the problem is, that I get this notice, when I'm trying to refer to any of the $_GET['var']'s.
echo $_GET['kraj'];
Notice: Undefined index: kraj in C:\wamp\www\inc\pages\filtr.php on line 23
And here is the URL code:
What I...
How do put htmlcode in heredoc syntax. With in this HTML i May have some PHP Variables needs to be interpreted
and Some PHP loops needs to be executed .How Do i do all this can any one show an example
$con = <<<EOC
<style type="text/css">
.tddata {color:#330000;border-width:0px;font-family:Arial;font-size:12pt;font-weight:bold}
.tdhe...
Hi,
I hava set up AJAX script that when you click the button it calls a PHP document.
The problem I have is now some of the variables of the PHP file are set to constant, and now I want them to be conditional to what gets sent when the button is clicked.
I want there to be a check box, that if clicked, will set a PHP variable to be TR...
Need to downgrade php to 5.2.x, so I followed this tutorial:
http://andreys.info/blog/2010-03-25/compile-php-5-2-on-osx-10-6-snow-leopard#comment-631
I'm on snow leopard 10.6.4, with xcode installed.
So I compiled php5.2.x and completed the tutorial. phpinfo() loaded within the browser at htp://localhost says 5.2.x, Great!! But, Termin...
Hi,
I've got a bit of a problem that I can't seem to get to the bottom of. I'm a bit fo a Solr Noobie so stick with me here.
I am writing a script to populate a solr instance with a small subset of documents, around 250 using the PHP SolrClient.
The script runs through and seems to be populating fine. However my document count nev...
So I have no idea what the deal is here... the following code below produces the mysql error following the code.
$fcontents = file("inventory.csv");
for ($i = 1; $i < sizeof($fcontents); $i++) {
$line = trim($fcontents[$i]);
$arr = explode(',', $line);
$values = implode(',', $arr);
$values = str_replace('&', 'and', $va...
I have the following script which runs fine but I think
a) it is ugly;
b) it doesn't do what I need after the script is run.
Utlimately, the script should work as follows:
1) SQL selects all agents from a given table where the enrollment date is within the last month, grouped together by agent number where the count is greater than ...
Has anyone used the new DOMi?
I can't get this to work:
function createXML($proparray)
{
include("domi.class.php");
$DOMi = new DOMi('root');
$DOMi->AttachToXML($proparray, 'property');
$DOMi->Render(array(),'RENDER_XML');
}
}
$proparray is an array: a numeric array holding multiple multidimensional associative ar...
Here is my code (using CodeIgniter):
$now = date('Y-m-d');
$then = strtotime($now . '-1 week');
$then = date('Y-m-d', $then);
$q3 = $this->db->query("SELECT *
FROM posts
WHERE publish_date BETWEEN '$then' AND '$now'");
$data['posts_today'] = $q3->num_rows();
I clearly have poste...
I was using a hosting to run my site, lately it has been working fine but today i opened the site in the browser at "http://www.arquisanjose.org/ver2" and shows me the following message:
i´ll appreciate some of your help...
...
This is what I want an user to be able:
Upload ANY file to the server (attachment) to the uploads folder
Be Able to download it afterwards
So I have created this dir with the following .htaccess
Allow from all
DirectoryIndex .x
php_flag engine off
Options -Indexes
Options -ExecCGI
AddType text/plain .html .htm .shtml .php .php3 .php...
I have a script that uses php and curl to auto logon to a site and perform some actions.
That bit is ok but I now want to send the script to other people so they can use it.
So I can create a batch file that executes the script.
The problem will be the users won't have php instaled on their computer and would probally have to enable ...
I've developed a billing summary page use mysql + php.
there are many users : (1M)
light user :each has less than 10K record :0.99M users
heavy user :each has about 1M record
SQL is the following :
SELECT SUM(value_a) A, SUM(value_b) B, SUM(value_c) C
FROM daily_data_sep_2010
WHERE user_id='<user_id>'
AND type
IN (
'type_a', ...