i hav entered my code in controller like below
function keyup(){
$this->Note->simple();
if(strlen($searchq)>0){
while ($row = mysql_fetch_array($getRecord)) {
echo $row['name']; echo $row['department'];
}
return $row;
}
}
as soon as i entered this one it doesn't display any info ....
what correction should require......
Can anybody provide me the ZEND modular running example.All working as i m really tired trying things.
Regards
Jos
...
Ok, I am trying to place parameters into a function that is called like so:
$parameters['function']($parameters['params']);
Here is the function and the parameters that I need to be placed into this:
$parameters['function'] = 'test_error';
$parameters['params'] = array(0 => $txt['sometext'], 1 => 'critical', 2 => true);
The test_er...
So I have the following HTML and am trying to change which item is selected.
<select name="coolselectbox">
<option value="default" selected="selected">---</option>
<option value="something">Something</option>
<option value="something-else">Something Else</option>
</select>
Here's what I've tried:
QWebElement defaultOpt =
...
Hello, I am looking for a good solution to parse OCR-B fonts off a PNG images fed from scanners. Any tips on a engine? In php
...
Hi,
with this piece of code
$feOnline = New Zend_Form_Element_Radio('online');
$feOnline->setValue($article->online)
->addMultiOptions(array(0=>'offline', 1=>'online'))
->setLabel('Online');
this html is generated
<dd id="online-element">
<label for="online-0">
<input type="radio" checked="checked" value="0" id="...
I used the auto-complete function in jquery. It's data source are the results from a php-back-end.
$("#ice_id").autocomplete("ice-ver.php", { extraParams : { flavour_id: $("#flavour_id").val() } });
Let us take following example:
We type in the flavour ID 3992 ...(and 3992 exists in the database and is properly returned by the php b...
Im making my own function to search for the total number of something. but it is not working propperly. function getNumberOfCounts gets the $fromIndex but not the searchWord
public function getNumberOfCounts( $searchWord, $fromIndex )
{
$index = $fromIndex;
$counter = 0;
while( $index <= $endPos )
{
$inde...
//URL START
$urlregex = "^(https?|ftp)\:\/\/";
// USER AND PASS
$urlregex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$_.-]+)?@)?";
// HOSTNAME OR IP
$urlregex .= "[a-z0-9+\$_-]+(\.[a-z0-9+\$_-]+)*";
// PORT
$urlregex .= "(\:[0-9]{2,5})?";
// PATH
$urlregex .= "(\/([a-z0-9+\$_-]\.?)+)*\/?";
// GET Query
$urlregex .= "(\?[a-z+&\$_.-...
Hi,
i'm starting a new jQTouch-project now and i'm thinking of using facebook connect to make it easier for users to register with my site. do anyone have any experience with this?
I'm using the Facebook PHP SDK (from github), and i first tried to use it with the built in example, it worked good.
i later tried it with jQTouch (the lat...
Hi,
I am using PHP Crypt_RSA (http://pear.php.net/package/Crypt_RSA) for encrypting and decrypting the contents. Contents are of 1kb size. Following are the results:
keylength = 1024
Encryption function takes time: 225 secs
keylength = 2048
Encryption function takes time: 115 secs
I need to reduce this execution time as most...
I use the following to download a file with PHP:
ob_start();
$browser = id_browser();
header('Content-Type: '.(($browser=='IE' || $browser=='OPERA')?
'application/octetstream':'application/octet-stream'));
header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
header('Content-Transfer-Encoding: binary');
header('Co...
I have one main.php file with a class definition. Other php files use this main.php file
//main.php
<?php
class A{
}
//I want to execute the following statements exactly once
$a = new A();
/*
Some code
*/
?>
I use main.php in other php files like
//php1.php
<?php
require_once("main.php");
$b = new A();
/*
Some code
*...
When i tried to connect to Apache Cassandra server using the php code i got an error "Fatal error: Call to undefined function uuid_make()". I can find that PHP UUID extension was missing in PHP installation. Can anyone please suggest from where i can download the DLL file for PHP installation in my Windows 7 Machine.
...
I am trying to store a list of countries in a mySQL database.
I am having problems storing (non English) names like these:
São Tomé and Príncipe
República de El Salvador
They are stored with strange characters in the db, (and therefore output strangely in my HTML pages).
I have tried using different combinations of collations for t...
i'm trying to follow DRY and i've got some functions i have to reuse.
i put them all as static functions in a class and want to use them in another class.
what is the best way to make them available to a class.
cause i can't extend the class, its already extended.
should/could i use composition?
what is best practice?
thanks!
...
Ok, I'm allowing the uploading of files which can have multiple functions in them. I need to be able to somehow error trap the include_once so that if the function_exists already and that function is being called within the file that is uploaded, than it, either 1 sends an error message, or 2 doesn't include the file at all.
Any Ideas?...
Can I use zend Registry to save variable to use in other controller?
this is my code that don't work in another controller:
Zend_Registry::set('id', $Id);
...
Hi,
I'm getting extra white space, that is not CSS, or nothing like it on the view output: The HTML.
I've checked for ?> (removed, where I could), saved UTF8 without BOM. Checked for existent white space in the beginning of each file, even at end.
This is the structure:
index.php - this is the entry point;
MODEL/
CONTROLLER/
VIEW/
...
Hi,
im using the following to send a contact us type form, iv looked into security and only found that you need to protect the From: bit of the mail function, as ive hardcoded this does that mean the script is spamproof / un-hijackable
$tenantname = $_POST['tenan'];
$tenancyaddress = $_POST['tenancy'];
$alternativename = $_POST['alter...