Jump to content

takeme2web

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

takeme2web's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. $yourhiddenzendformelement->setDecorators(array('ViewHelper')); should get rid off any whitespace
  2. Dear Experts, I have a zend_form which contains a form element "customerdob" date of birth. I want to add a datepicker icon next to this field, which when clicked on should execute a javascript to show the date picker. I have the datepicker coming up currently "onfocus" on the "customerdob" field as shown below in my Zend_Form class; //add element: effectivefromdate textbox $customerdob = $this->createElement('text', 'customerdob'); $customerdob->setLabel('Date of Birth (yyyy-mm-dd):'); $customerdob->setRequired(TRUE); $customerdob->addValidator(new Zend_Validate_Date('YYYY-MM-DD')); $customerdob->setAttrib('size', 20); $customerdob->setAttrib('onfocus', "javascript:NewCal('customerdob','YYYYMMDD')"); $this->addElement($customerdob); However, I want to add an icon next to the text field for the user's to click on it to get the datepicker. Is this possible in Zend_Form? or should I go back to rendering individual fields in HTML viewscritps and adding the href tag to and image as shown below? <input type="text" name="customerdob" id="customerdob" value="<?php echo date("Y-m-d", time()); ?>" size="12" /> <a href="javascript:NewCal('customerdob','YYYYMMDD')"><img src="/images/cal.gif" width="16" height="16" border="0" alt="Select a date"></a> Please share your thoughts and help. Regards Takeme2web-Bala
  3. Experts, I have a general question related to PHP based application deployment using Zend Framework. 1. Since there is no compiled executable such as JAR or WAR file in PHP application, How do we ensure that the application code is not copied or pirated for another deployment by the Customer. Is PHP Encoders(many in mkt with a significant price tag!) the way to protect? 2. Since PHP is not compiled and deployed, I am assuming that it is interpreted. If the reasoning is correct, how does the PHP applications perform in terms of user interaction response time, when compared with a java application? Appreciate your views and knowledge sharing. Regards Takeme2Web-Bala
  4. Dear Mr.Thorpe, Thanks for your reply. Appreciate if you could she more light on going thru each row in the html table and getting those tiw input field values. Regards Takeme2web-Bala
  5. Dear Experts, I am fairly new to Zend Framework and I am struggling with the following; If I have a simple zend_form, that I submit then I get the form submission values using the following code in the CONTROLLER action; $submittedValueForField1 = $this->_request->getParam('Field1'); However, if I have a HTML FORM (read as ViewScript in MVC ZF terminology) with a Table and has couple of the table field columns as input text fields such as shown below; <td> <a href='/order/addtocart/itemid/<?php echo $this->item_id; ?>/itemname/<?php echo $this->item_name; ?>/requestdate/2010-10-20/requestquantity/100 '>Add to Order</a> </td> <td> <?php echo $this->item_name; ?> </td> <td> <input type="text" name="requestdate" id="requestdate" value="<?php echo date("Y-m-d", time()); ?>" size="12" /> </td> <td> <input type="text" name="requestquantity" id="requestquantity" value="1" size="12" /> </td> These two fields (requestquantity and requestdate) are user entered fields in the html table. Upon submission, how do I pass the user entered fields to a controller action? In the above, I pass the variables in the "Add to Order" link which executes the "addtocartAction" in the controller. In the above example, I have simply hard coded the request date and request quantity. The other values such as itemid, itemname are obtained as part of the DB Adapter paginator. Appreciate your help? Regards Takeme2Web-Bala
  6. All, Is Standard PHP Library is part of PHP 5.2.11 version? Or Do I have to download the SPL from some URL? Please let me know. Please note that I have posted the same message in the "Other Scripts" forum too. Thanks Takeme2web-Bala
  7. All, I figured out (ofcourse based on online info for someother similar issues) and little bit of reviewing the Apache error log. Apache error log showed the following error; PHP Warning: PHP Startup: Unable to load dynamic library 'c:\\php\\ext\\php_mcrypt.dll' - The specified module could not be found.\r\n in Unknown on line 0 1. copy the libmcrypt.dll into c:\windows\system32 directory (NOTE: I did not have to copy the php_mcrypt.dll) 2. Restart Apache. 3. All is Well...! Regards Takeme2Web-Bala
  8. Dear Experts, Q: How to enable MCRYPT module in PHP/ZF? I have done the following; 1. Ensured that libmcrypt.dll and php_mcrypt.dll are in the c:\php\ext directory. 2. php.ini file modified to include the following; extension_dir = "c:\php\ext" extension=php_mcrypt.dll include_path=".;c:\php\ext;C:\php\pear;c:\php\includes;c:\zendframework196\library" 3. Restarted Apache. 4. I am running the following code in my Test2Controller.php file $inputtext = $this->_request->getParam('inputtext'); $key = 'SomeSaltKeyThatIsASecret'; $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $encryptedtext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $inputtext, MCRYPT_MODE_ECB, $iv); $decryptedtext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $encryptedtext, MCRYPT_MODE_ECB, $iv); Still I am getting the following error; Fatal error: Call to undefined function mcrypt_get_iv_size() in C:\local\myapps\application\controllers\Test2Controller.php on line 42 I have referred to PHP documentation and searched online for help. Look like I am doing the right things. Is there anything that I am missing in enabling the mcrypt module. In the PHP documentation "Installation: You need to compile PHP with the --with-mcrypt[=DIR] parameter to enable this extension. DIR is the mcrypt install directory. Make sure you compile libmcrypt with the option --disable-posix-threads." which I dont understand. Please Help. Regards Takeme2Web-Bala
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.