Search Results

Search found 768 results on 31 pages for 'cakephp 1 3'.

Page 23/31 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Sending mail through PHP

    - by Angeline Aarthi
    I'm trying to sends mails in PHP. The code I used for sending a mail in CakePHP is given below. I get the message 'Simple Email Sent' in my web page but the mail is not delivered to my inbox. Am I missing something? The values in the to, subject and link fields are set with the values entered in the user interface. $this->set('to',$this->params['form']['to']); $this->set('subject',$this->params['form']['subject']); $this->set('link',$this->params['form']['link']); $this->Email->to = to; $this->Email->subject = subject; $this->Email->from = '[email protected]'; $this->Email->delivery= 'mail'; $this->Email->sendAs='text'; $this->Email->template = 'simple_message'; //$this->Email->send(link); if ( $this->Email->send(link) ) { $this->Session->setFlash('Simple email sent'); } else { $this->Session->setFlash('Simple email not sent'); }

    Read the article

  • Cakephp ajax Autocomplete not working

    - by Vijay Kumbhar
    Hello All, I am using ajax autocomplete in my application, but it is not giving the output. Ajax request to the desired function goes but it is not giving back any response, it is blank. I am also using jquery but it is used for other effects. i added jquery no conflict to avoid the prototype & jquery conflicts. I have tried other ajax helper methods like obeserverfield, it is working fine & returning the proper response, but when i use autocomplete it fails Can anybody help me ..........

    Read the article

  • HTML table manipulation using jQuery

    - by Daniel
    I'm building a site using CakePHP and am currently working on adding data to two separate tables at the same time.. not a problem. The problem I have is that I'm looking to dynamically alter the form that accepts the input values, allowing the click of a button/link to add an additional row of form fields. At the moment I have a table that looks something like this: <table> <thead> <tr> <th>Campus</th> <th>Code</th> </tr> </thead> <tbody> <tr> <td> <select id="FulltimeCourseCampusCode0CampusId" name="data[FulltimeCourseCampusCode][0][campus_id]"> <option value=""></option> <option value="1">Evesham</option> <option value="2">Malvern</option> </select> </td> <td> <input type="text" id="FulltimeCourseCampusCode0CourseCode" name="data[FulltimeCourseCampusCode][0][course_code]"> </td> </tr> </tbody> What I need is for the row within the tbody tag to be replicated, with the minor change of having all the zeros (i.e. such as here FulltimeCourseCampusCode0CampusId and here data[FulltimeCourseCampusCode][0][campus_id]) incremented. I'm very new to jQuery, having done a few minor bits, but nothing this advanced (mostly just copy/paste stuff). Can anyone help? Thank you.

    Read the article

  • MySql stored procedure not found in PHP

    - by kaupov
    Hello, I have a trouble with MySql stored procedure that calls itself recursively using PHP (CakePHP). Calling it I receive following error: SQL Error: 1305: FUNCTION dbname.GetAdvertCounts does not exist The procedure itself is following: delimiter // DROP PROCEDURE IF EXISTS GetAdvertCounts// CREATE PROCEDURE GetAdvertCounts(IN category_id INT) BEGIN DECLARE no_more_sub_categories, advert_count INT DEFAULT 0; DECLARE sub_cat_id INT; DECLARE curr_sub_category CURSOR FOR SELECT id FROM categories WHERE parent_id = category_id; DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_sub_categories = 1; SELECT COUNT(*) INTO advert_count FROM adverts WHERE category_id = category_id; OPEN curr_sub_category; FETCH curr_sub_category INTO sub_cat_id; REPEAT SELECT advert_count + GetAdvertCounts(sub_cat_id) INTO advert_count; FETCH curr_sub_category INTO sub_cat_id; UNTIL no_more_sub_categories = 1 END REPEAT; CLOSE curr_sub_category; SELECT advert_count; END // delimiter ; If I remove or comment out the recursive call, the procedure is working. Any idea what I'm missing here? The categories are 2 level deep.

    Read the article

  • HABTM selection seemingly ignores joinTable

    - by TheCapn
    I'm attempting to do a HABTM relationship between a Users table and Groups table. The problem is, that I when I issue this call: $this->User->Group->find('list'); The query that is issued is: SELECT [Group].[id] AS [Group__id], [Group].[name] AS [Group__name] FROM [groups] AS [Group] WHERE 1 = 1 I can only assume at this point that I have defined my relationship wrong as I would expect behavior to use the groups_users table that is defined on the database as per convention. My relationships: class User extends AppModel { var $name = 'User'; //...snip... var $hasAndBelongsToMany = array( 'Group' => array( 'className' => 'Group', 'foreignKey' => 'user_id', 'associationForeignKey' => 'group_id', 'joinTable' => 'groups_users', 'unique' => true, ) ); //...snip... } class Group extends AppModel { var $name = 'Group'; var $hasAndBelongsToMany = array ( 'User' => array( 'className' => 'User', 'foreignKey' => 'group_id', 'associationForeignKey' => 'user_id', 'joinTable' => 'groups_users', 'unique' => true, )); } Is my understanding of HABTM wrong? How would I implement this Many to Many relationship where I can use CakePHP to query the groups_users table such that a list of groups the currently authenticated user is associated with is returned?

    Read the article

  • Array values changing unexpectedly

    - by Lizard
    I am using cakephp 1.2 and I have an array that appears to have a value change even though that variable is not being manipulated. Below is the code to that is causing me trouble. PLEASE NOTE - UPDATE Changing the variable name makes no difference to the outcome, The values get changed somewhere between the two print_r calls, and I can't see why the $this-find would do this . echo "Start of findCountByString()"; print_r($myArr); $test = $this->find('count', array( 'conditions' => $conditions, 'joins' => array('LEFT JOIN `articles_entities` AS ArticleEntity ON `ArticleEntity`.`article_id` = `Article`.`id`'), 'group' => 'Article.id' )); echo "End of findCountByString()"; print_r($myArr); I am getting the following output: Start of findCountByString() Array ( [0] => 4bdb1d96-c680-4c2c-aae7-104c39d70629 [1] => 4bdb1d6a-9e38-479d-9ad4-105c39d70629 [2] => 4bdb1b55-35f0-4d22-ab38-104e39d70629 [3] => 4bdb25f4-34d4-46ea-bcb6-104f39d70629 ) End of findCountByString() Array ( [0] => 4bdb1d96-c680-4c2c-aae7-104c39d70629 [1] => 4bdb1d6a-9e38-479d-9ad4-105c39d70629 [2] => 4bdb1b55-35f0-4d22-ab38-104e39d70629 [3] => '4bdb25f4-34d4-46ea-bcb6-104f39d70629' # This is now in inverted commas ) The the value in my array have changed, and I don't know why? Any suggestions?

    Read the article

  • How to get HABTM associated data using hasOne binding

    - by Moin
    Hi, I am following example documented at http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM I am trying to retrieve associated data using hasOne. I created 3 tables posts, tags and posts_tags. I wrote following code to debug Posts. $this->Post->bindModel(array( 'hasOne' => array( 'PostsTag', 'FilterTag' => array( 'className' => 'Tag', 'foreignKey' => false, 'conditions' => array('FilterTag.id = PostsTag.tag_id') )))); $output=$this->Post->find('all', array( 'fields' => array('Post.*') )); debug($output); I was expecting output something like below. Array ( 0 => Array { [Post] => Array ( [id] => 1 [title] => test post 1 ) [Tag] => Array ( [0] => Array ( [id] => 1 [name] => php ) [1] => Array ( [id] => 2 [name] => javascript ) [2] => Array ( [id] => 3 [name] => xml ) ) } But my output do not have Tags at all. Here is what I got. Array ( [0] => Array ( [Post] => Array ( [id] => 1 [title] => test post1 ) ) [1] => Array ( [Post] => Array ( [id] => 2 [title] => test post2 ) ) ) How do I get associated tags along with the post. I know I am missing something, but unable to figure out. Any help would be highly appreciated.

    Read the article

  • Inbreeding-immune database structure

    - by Nick Savage
    I have an application that requires a "simple" family tree. I would like to be able to perform queries that will give me data for an entire family given one id from a member in the family. I say simple because it does not need to take into account adoption or any other obscurities. The requirements for the application are as follows: Any two people will not be able to breed if they're from the same genetic line Needs to allow for the addition of new family lines (new people with no previous family) Need to be able to pull siblings, parents separately through queries I'm having trouble coming up with the proper structure for the database. So far I've come up with two solutions but they're not very reliable and will probably get out of hand quite quickly. Solution 1 involves placing a family_ids field on the people table and storing a list of unique family ids. Each time two people breed the lists are checked against each other to make sure no ids match and if everything checks out will merge the two lists and set that as the child's family_ids field. Example: Father (family_ids: (null)) breeds with Mother (family_ids: (213, 519)) -> Child (family_ids: (213, 519)) breeds with Random Person (family_ids: (813, 712, 122, 767)) -> Grandchild (family_ids: (213, 519, 813, 712, 122, 767)) And so on and so forth... The problem I see with this is the lists becoming unreasonably large as time goes on. Solution 2 uses cakephp's associations to declare: public $belongsTo = array( 'Father' => array( 'className' => 'User', 'foreignKey' => 'father_id' ), 'Mother' => array( 'className' => 'User', 'foreignKey' => 'mother_id' ) ); Now setting recursive to 2 will fetch the results of the mother and father, along with their mother and father, and so on and so forth all the way down the line. The problem with this route is that the data is in nested arrays and I'm unsure of how to efficiently work through the code. If anyone would be able to steer me in the direction of the most efficient way to handle what I want to achieve that would be tremendously helpful. Any and all help is greatly appreciated and I'll gladly answer any questions anyone has. Thanks a lot.

    Read the article

  • CakeDC Users Plugin - I Can't Send Emails

    - by JimBadger
    I apologise for the rambling nature of this question, please bear with me and I'll provide all the extra info needed for you to stop me going mad from failing at something that looks inherently very straightforward... I've just installed CakePHP 2.2, and the first thing I've done is add the cakeDC Users plugin. It's all working, apart from sending an email verification when a user registers. I've tried so many combinations of different things in email.php, that I have now utterly got my knickers in a twist. Whatever I do, when the verification email should be sent, all I get is: No connection could be made because the target machine actively refused it. My email.php currently looks like this: class EmailConfig { public $default = array( 'transport' => 'Smtp', 'from' => '[email protected]', //'charset' => 'utf-8', //'headerCharset' => 'utf-8', ); public $smtp = array( 'transport' => 'Smtp', 'from' => array('Blah <[email protected]>' => 'Chimp'), 'host' => 'ssl://smtp.gmail.com', 'port' => 465, 'timeout' => 30, 'username' => '[email protected]', 'password' => 'secret', 'client' => null, 'log' => false, //'charset' => 'utf-8', //'headerCharset' => 'utf-8', ); public $fast = array( 'from' => '[email protected]', 'sender' => null, 'to' => null, 'cc' => null, 'bcc' => null, 'replyTo' => null, 'readReceipt' => null, 'returnPath' => null, 'messageId' => true, 'subject' => null, 'message' => null, 'headers' => null, 'viewRender' => null, 'template' => false, 'layout' => false, 'viewVars' => null, 'attachments' => null, 'emailFormat' => null, 'transport' => 'Smtp', 'host' => 'blah.net', 'port' => 25, 'timeout' => 30, 'username' => 'user', 'password' => 'secret', 'client' => null, 'log' => true, //'charset' => 'utf-8', //'headerCharset' => 'utf-8', ); } How do I get cakeDC Users plugin to just send a non-SMTP email? Or do I have to use, for example, my Gmail details? But, if I do have to go down the SMTP route, what is wrong with the above? Other info: I'm using the latest version of XAMPP and my PHP install is ssl enabled.

    Read the article

  • how to get 12 for joel test working in a small team of 3-4 on php website?

    - by keisimone
    Hi i read this inspired, i am asking for specific help to achieve a 12 for my current project. i am working in a team of 3-4 on a php project that is based on cakephp. i only have a dedicated server running on linux which i intend to have the website live on. and i have a plan with assembla where i am using its svn repository. that's it. i like to hear a major, impactful step towards answering each point raised by the joel test. by impactful i mean doing just this one thing would raise my project to scoring or close to scoring on that area of the joel test. lets begin: 1) do you have a source control system? I am very proud to say learning how to use svn even though we know nuts about branch/release policies made the biggest impact to our programming lives. and the svn repos is on assembla paid plan. Feel free to add if anyone thinks we can do more in this area. 2) Can you make a build in one step? i think the issue is how do i define as a build? i think we are going to define it as if tomorrow my dedicated server crashed and we found another server from another normal hosting provider and all my team's machines all destroyed, how are we going to get the website up again? my code is in svn on assembla. 1 step means as close to 1 button to push as possible. 3)Do you make daily builds? i know nothing about this. please help. i googled and came across this phpundercontrol. but i am not sure if we can get that to work with assembla. are there easier ways? 4)Do you have a bug database? we have not used the assembla features on bug tracking. ashamed to say. i think i will sort this out myself. 5)Do you fix bugs before writing new code? policy issue. i will sort it out myself. 6)Do you have an up-to-date schedule? Working on it. Same as above. estimates have historically been overly optimistic. having spent too much time using all sorts of funny project management tools, i think this time i am going to use just paper and pen. please dont tell me scrum. i need to keep things even simpler than that. 7)Do you have a spec? We do, but its in paper and pen. what would be a good template? 8)Do programmers have quiet working conditions? Well we work at home and in distributed manner. so .. 9)Do you use the best tools money can buy? We use cheap tools. we are not big. 10)Do you have testers? NO testers. Since we have a team of 3, i think i should go get 1 tester. even on a part time basis. so i should get this 1 part time tester test in what manner to extract maximum effects? should i get him to write out the test scenarios and expected outcomes and then test it? or i write the test scenarios and then ask him to do it? we will be writing the test cases ourselves using simpletest. i came across selenium. how useful is that? 11)Do new candidates write code during their interview? Not applicable. But i will do it next time i try to hire anyone else. hires or contractors alike. 12)Do you do hallway usability testing? Will do so on a per month or per milestone basis. i will grab my friends who are not net-savvy. they will be the best testers of this type. Thank you.

    Read the article

  • Using TCPDF and FPDI with cake php

    - by kwhohasamullet
    Hi Guys, I have go TCPDF setup in my cake php install and am now trying to also use FPDI with it as i need to add a PDF to the start of the PDF that is being generated. WHen trying to do this i am using 3 classes XTCPDF which holds my header data FPDI - FPDI class TCPDF - TCPDF class and it is setup as so: XTCPDF extends FPDI FPDI extends TCPDF When i try and generate a PDF with this using commands from teh FPDI classs i get the following error: Fatal error: Cannot access protected property XTCPDF::$PDFVersion in C:\Program Files\XAMPP\xampp\htdocs\quote\app\vendors\fpdi\fpdi_pdf_parser.php on line 388 Im thinking this may be a scope problem but im not too sure, i have also tested by changing it around to not include XTCPDF class but the same error occurs, EDIT: The code that i am using that accesses the FPDI class is: $tcpdf->setSourceFile(APP.'webroot'.DS.'img'.DS.'pdf'.DS.'front_cover.pdf'); $frontCover = $tcpdf->importPage(1); $tcpdf->useTemplate($frontCover); Thanks in advance for any help :D

    Read the article

  • php foreach question

    - by user295189
    I have the following code $oldID=-1; $column=0; foreach($pv->rawData as $data){ if ($oldID!= $data->relativeTypeID){ $oldID= $data->relativeTypeID; $column++; $row=1; } echo "Row: ".$row.": Column: ".$column.": ID".$data->relativeTypeID."<br>"; //if exists a description if($data->description){ //insert here in the array $pv->results[$data->relativeTypeID][$row][0]= $data->relation; $pv->results[$data->relativeTypeID][$row][1]= ''; $pv->results[$data->relativeTypeID][$row][2] =''; $pv->results[$data->relativeTypeID][$row][3] = ''; $row++; } } this generates this output Row: 1: Column: 1: ID1 Row: 2: Column: 1: ID1 Row: 1: Column: 2: ID2 Row: 2: Column: 2: ID2 Row: 3: Column: 2: ID2 Row: 4: Column: 2: ID2 Row: 5: Column: 2: ID2 Row: 6: Column: 2: ID2 Row: 7: Column: 2: ID2 Row: 8: Column: 2: ID2 Row: 9: Column: 2: ID2 Row: 10: Column: 2: ID2 Row: 11: Column: 2: ID2 Row: 1: Column: 3: ID3 Row: 1: Column: 4: ID4 Row: 1: Column: 5: ID8 Row: 2: Column: 5: ID8 Row: 3: Column: 5: ID8 Row: 1: Column: 6: ID10 Row: 2: Column: 6: ID10 Row: 3: Column: 6: ID10 Row: 4: Column: 6: ID10 ... .. what I want it to do is to stop at the top 4 columns so I want an output like this Row: 1: Column: 1: ID1 Row: 2: Column: 1: ID1 Row: 1: Column: 2: ID2 Row: 2: Column: 2: ID2 Row: 3: Column: 2: ID2 Row: 4: Column: 2: ID2 Row: 5: Column: 2: ID2 Row: 6: Column: 2: ID2 Row: 7: Column: 2: ID2 Row: 8: Column: 2: ID2 Row: 9: Column: 2: ID2 Row: 10: Column: 2: ID2 Row: 11: Column: 2: ID2 Row: 1: Column: 3: ID3 Row: 1: Column: 4: ID4 as you can see it stopped at column 4. Thanks

    Read the article

  • why this sql not working?

    - by user295189
    I have a query public static function TestQuery( $start=0, $limit=0){ $sql = " SELECT count(*) AS total FROM db.table1 JOIN db.table2 ON table1.fieldID = {$fieldID} AND table2.assigned = 'N'"; $qry = new SQLQuery; $qry-query($sql); if($row = $qry-fetchRow()){ $total = intval($row-total); } return $total; } which works fine but when I add the limit as below, then it doesnt work and gives me errors public static function TestQuery( $start=0, $limit=0){ $sql = " SELECT count(*) AS total FROM db.table1 JOIN db.table2 ON table1.fieldID = {$fieldID} AND table2.assigned = 'N'"; //this fails if($recordlimit 0) $sql .= "LIMIT {$startRecord}, {$recordLimit} "; // $qry = new SQLQuery; $qry-query($sql); if($row = $qry-fetchRow()){ $total = intval($row-total); } return $total; } Any help will be appreciated

    Read the article

  • mysql query the latest date

    - by user295189
    I am running this query SEL ECT sh.*, u.initials AS initals FROM database1.table1 AS sh JOIN database2.user AS u ON u.userID = sh.userid WHERE id = 123456 AND dts = ( SELECT MAX(dts) from database1.table1 ) ORDER BY sort_by, category In the table1 I have records like this dts status category sort_by 2010-04-29 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:54 Married Marital Status 2 2010-04-28 12:21:15 Smoker Tobbaco 3 2010-04-27 12:20:27 Civil Engineers Occupation 1 2010-04-27 12:20:54 Married Marital Status 2 2010-04-27 12:21:15 Smoker Tobbaco 3 2010-04-26 12:20:27 Civil Engineers Occupation 1 2010-04-26 12:20:54 Married Marital Status 2 2010-04-26 12:21:15 Smoker Tobbaco 3 so if you look at my data, I am choosing the latest entry by category and sort_id. however in some case such as on 29th (2010-04-29 12:20:27) I have only one record. So in this case I want to show occupation for latest and then the rest of them (latest). But currently it displays only one row. Thanks

    Read the article

  • Removing New line character in Fields PHP

    - by Aruna
    Hi, i am trying to upload an excel file and to store its contents in the Mysql database. i am having a problem in saving the contents.. like My csv file is in the form of "1","aruna","IEEE paper" "2","nisha","JOurnal magazine" actually i am having 2 records and i am using the code <?php $string = file_get_contents( $_FILES["file"]["tmp_name"] ); //echo $string; foreach ( explode( "\n", $string ) as $userString ) { echo $userString; } ? since in the Csv record there is a new line inserted in between IEEE and paper it is dispaying me as 3 records.. How to remove this new line code wise and to modify the code so that only the new line between the records 1 and 2 is considered... Pls help me....

    Read the article

  • How to return id of a submitted form using Prototype?

    - by pstinnett
    I have a page that has several ajax submission forms. Each form has a dynamic id assigned to it when it's written to the page. Does anyone know if there is an easy way to return the id of the form that is being submitted? I'm basically looking to click "submit" and alert the id of the submitted form. From there I can use it in the ajax onSuccess function.

    Read the article

  • Cake php menu generation

    - by RSK
    hai everyone........ I am trying to generate dynamic menu according to the user permission given with ACL component in cake php.. ie., if a user logins, i need to check which all actions are permitted for that specific user and according that list of actions i need to generate menu can any one help me to get all the permitted actions from the acos,aros,acos_aros tables thanks in advance

    Read the article

  • Non Working Relationship

    - by Dominik K.
    Hello everyone, I got a problem with cake's model architecture. I got a Users-Model and a Metas-Model. Here are the model codes: Users: <?php class User extends AppModel { var $name = 'User'; var $validate = array( 'username' => array('notempty'), 'email' => array('email'), 'password' => array('notempty') ); var $displayField = 'username'; var $hasMany = array( 'Meta' => array( 'className' => 'Meta', 'foreignKey' => 'user_id' ) ); } ?> and the Metas Model: <?php class Meta extends AppModel { var $name = 'Meta'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'required' => true ) ); } ?> So now the question is why do I not get the Meta data into the User array? Should I get it in the Auth object? Or where can I work with the meta data? hope you can help me! Have a nice Day! Dom

    Read the article

  • Inflector::humanize($key) converts Date of joining TO Date Of Joining

    - by Aruna
    Hi, I have a Form and i am submitting them like using function submit($formid = null,$fillerid=null) { $this->data['Result']['form_id']=$formid; $this->data['Result']['submitter_id']=$fillerid; $this->data['Result']['submitter']=$this->Session->read('filler'); echo "submitter: ".$this->Session->read('filler'); $results=$this->Form->hasResults($this->data); //echo http_build_query($_POST); if(empty($results)){ foreach ($_POST as $key => $value): if(is_array($value)){ $value = implode('', $_POST[$key]); $this->data['Result']['value']=$value; } else{ $this->data['Result']['value']=$value; } $this->data['Result']['form_id']=$formid; $this->data['Result']['submitter_id']=$fillerid; $this->data['Result']['label']=Inflector::humanize($key); $this->data['Result']['submitter']=$this->Session->read('filler'); $this->Form->submitForm($this->data); endforeach; $this->Session->setFlash('Your entry has been submitted.'); } I am having A fORM LIKE <form method="post" action="/FormBuilder/index.php/forms/submit/1/4" id="ResultSubmit"> <div class="input text"><label for="1">Firstname</label><input type="text" value="" style="width: 300px;" id="1" name="Firstname"/></div> <br/> <div class="input text"><label for="2">Last Name</label><input type="text" value="" style="width: 300px;" id="2" name="Last Name"/></div> <br/> <div class="input text"><label for="3">Age</label><input type="text" value="" style="width: 200px;" id="3" name="Age"/></div> <br/> <center> <span id="errmsg3"/> </center> <div class="input textarea"><label for="4">Address</label><textarea style="height: 300px;" id="4" rows="6" cols="30" name="Address"/></div> <br/> <div class="input text"><label for="5">Date Of Joining</label><input type="text" value="" style="width: 300px;" id="5" name="Date of joining"/></div><br/> <div class="input text"><label for="6">Email - Id</label><input type="text" value="" style="width: 300px;" id="6" name="Email - id"/></div> <br/> <div class="input text"> <label for="7">Personal Number</label><input type="text" value="" maxlength="3" style="width: 30px;" id="7" name="Personal Number[]"/><input type="text" value="" style="width: 30px;" maxlength="3" id="7-1" name="Personal Number[]"/><input type="text" value="" style="width: 70px;" maxlength="4" id="7-2" name="Personal Number[]"/></div> <span id="errmsg7"/> <br/> <div class="input select"><label for="8">Gender</label><select id="8" name="Gender"> MaleFemale <div class="input text"><label for="9">Official Number</label><input type="text" value="" style="width: 200px;" id="9" name="Official Number"/></div><br/> <div class="input select"><label for="10">Experience</label><select id="10" name="Experience"> <option value="Fresher">Fresher</option><option yrs="" 5="" value="Below">Below 5 Yrs</option><option yrs="" 10="" value="Above">Above 10 yrs</option></select></div><br/> actually My input has the names as Firstname Last Name Age Address Date of joining Email - id Personal Number Gender Official Number But when i use Inflector::humanize($key) for saving the names which has white space characters they have converted into like Date Of Joining i.e.., O and J becomes Capital letters... But i need to save them as such as Date of joining.. How to do so???

    Read the article

  • working with arrays

    - by user295189
    I currently do a query which goes through the records and forms an array. the print_r on query gives me this print_r($query) yields the following: Array ( [0] = ( [field1] = COMPLETE [field2] = UNKNOWN [field3] = Test comment ) [1] = ( [field1] = COMPLETE [field2] = UNKNOWN [field3] = comment here ) [2] = ( [field1] = COMPLETE [field2] = UNKNOWN [field3] = checking ) [3] = ( [field1] = COMPLETE [field2] = UNKNOWN [field3] = testing ) [4] = ( [field1] = COMPLETE [field2] = UNKNOWN [field3] = working ) ) somehow I want to take this array and convert it back to php. So for example some thing like this $myArray = array( ...) then $myArray should yield the samething as the print_r($query) yeilds. Thanks

    Read the article

  • PHP array manipulation

    - by user295189
    I have the code below . it looks for the case and creates an array of rows and columns. $pv->results[$row1][1][0] actually is $pv->result->[rownumber][coulmnnumber][0]. Now this is for only 2 columns as you can see. However I want an array like $myArr = array(0=>1, 1=>7, 2=>8, 3=>9 ) to be added below for column. What it is doing, is adding 4 columns (0,1,2,3) into the code below. So now I will have 4 cases instead of 2 cases as I need to more columns. Also the case value will not be 1 and 2, it will be 1, 7, 8 and 9 respectively. How can I do that? Thanks. for($i=0;$i<count($pv->rawData); $i++){ SWITCH ($pv->rawData[$i]->my ID){ CASE '1': $row1++; $pv->results[$row1][1][0] = $pv->rawData[$i]->data; break; CASE '2': $row2++; $pv->results[$row2][2][0] = $pv->rawData[$i]->data; break; }

    Read the article

  • Advice needed from PHP/Cake PHP expert

    - by Hiro
    I'm very new to programming (besides SQL and databases), but I ultimately want to master Cake PHP for web development. Now, given how new I am, I'm rather lost as to how I get started. Down the road, I want to use MVC framework so that I help myself be disciplined in the way I build. However, I know basic knowledge of PHP and OOP PHP are required. So my question is this: what are the right steps to mastering Cake PHP? I don't want to skip critical phases of learning before learning to Cake PHP. At the same time, I don't want to spend more time than required learning PHP if I can learn it directly through Cake PHP knowledge. Any advice would be appreciated.

    Read the article

  • Appending a child in Cake

    - by pg
    I'm using cake & have a web form for entering URLs to go into my db. There will be one input space (url1) and below that a link that says "add another URL" which, when clicked, generates a new form (url2) and reuses the "add another URL". So it would be like: echo $form->input('name'); echo $form->input('id'); echo $form->input('url1'); echo $form->input('weight1'); echo '<a href="XXX">add another URL</a>'; and then, if XXX is clicked it would be like this: echo $form->input('name'); echo $form->input('id'); echo $form->input('url1'); echo $form->input('weight1'); echo $form->input('url2'); echo $form->input('weight2'); echo '<a href="XXX">add another URL</a>'; Is there a jquery script I can use to do this or does cake have something built in?

    Read the article

  • Multiple JS effects on one event

    - by Cylindric
    I've got a bunch of Ajax links in a menu that reload a div called #ajaxupdatediv. I want to display another div while that's loading the new content, so how would I fire off both effects? <div id="#ajaxupdatediv"> Content will go here </div> <div id="ajaxloadingdiv"> ...Loading... </div> Here's a bit of the PHP array( 'update' => '#ajaxupdatediv', 'before' => $this->Js->get('#ajaxupdatediv')->effect('fadeOut'), 'complete' => $this->Js->get('#ajaxupdatediv')->effect('fadeIn'), )

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >