Jump to content
Larry Ullman's Book Forums

clicken

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About clicken

  • Rank
    Newbie
  1. Larry, you are so cool! I mean that. Would I find your books at the library? It isn't that I don't think that I need to learn PHP in order to expand the Yii framework but rather, and I will use your horse and cart analogy: Yii is horsepower driven so that the cart and horse are together. Yii is like an Indy car, which I wouldn't dare try to drive at high speeds without lots of successful experience first And most important, a qualified trainer! Due to your tutorials, I was able to log-in to my yii site as demo/demo and submit a referral to the referral db table with permission to view my entry and update my entry if needed. Then logged in as admin/admin I could view entries, update or delete them. By doing that little bit I learned a little bit about PHP and Mysql. (yes I am new to that too.) Now I get to learn some more as I try to figure out why and how to get the login password to work. So, if I had not mentioned that I do not know PHP then you would have given me guidence? Talking too much has always been one of my faults!
  2. Larry, I can respect your stance, it is your knowledge and talent to share as you wish. You do not want to teach kindergarten. Could you recommend some of the best beginners classes/sites for learning Web development with PHP I would certainly go there. I have the PHP.net site bookmarked for reference. Just know that, at the same time I will continue with the Yii because I am very close to having a basic working site like I need it to for now.( I will go elsewhere when asking for help until I learn PHP.) I do want to learn PHP because I know that I will be expanding on this site.
  3. Hi Johnathon, I appreciate your comments, and I understand what you are saying. Yes, PHP is much more difficult than HTML and CSS however there was a time that those were greek to me as well. I learned HTML by fixing errors that were the result of designing with a FrontPage template. Now I can create a page from scratch using notepad. I learned CSS pretty much the same way. A very nice member of the WPW forum gave me a template with a css file to play with. At first everything may not make sense but over time it all starts to come together with research and practice. Larry's tutorial and the Yii files comment on what things are and what the code is doing which I find very helpful and if something doesn't register at first then eventually it will. Back to the topic, I read through the comments again... http://www.larryullm...-yii-framework/ and found this post by, Jens, which has solved my problem! it is as simple as...
  4. I have to start somewhere! Yii seemed to be a good starting point to learn because it offers a site with working examples. I learn better using the hands on approach. I knew that modifications would be needed but there seemed to be plenty of forums and sites offering help, like yours. I learned HTML and CSS with the help of WebProWorld members, I can learn anything I set my mind to, with help of course. Larry, your tutorials are greatly appreciated, you are obviously very talented and generous. I have come here because it was your example and if you didn't have time then perhaps another member here may be inclined to help. So, I am guessing the problem is in the controller for the login form because your code changed the form to a static CHtml form and the error stated that there was an undefined variable:form. Do I need to change the 'echo CActiveForm::...' to 'echo CHtmlForm::validate...' in the controller? Something tells me it isn't as simple as that.
  5. Okay, I have changed the form.php code to match Larry's And now,there is this error when I try to login... PHP Error - Undefined variable: form /opt/lampp/htdocs/debus/protected/views/site/login.php(15) The stack trace #4 – /opt/lampp/htdocs/debus/protected/controllers/SiteController.php(126): CController->render("login", array("model" => LoginForm)) highlites this code:line 126... // display the login form 126 $this->render('login',array('model'=>$model)); 127 } siteController /** * Displays the login page */ public function actionLogin() { $model=new LoginForm; // if it is ajax validation request if(isset($_POST['ajax']) && $_POST['ajax']==='login-form') { echo CActiveForm::validate($model); Yii::app()->end(); } // collect user input data if(isset($_POST['LoginForm'])) { $model->attributes=$_POST['LoginForm']; // validate user input and redirect to the previous page if valid if($model->validate() && $model->login()) $this->redirect(Yii::app()->user->returnUrl); } // display the login form $this->render('login',array('model'=>$model)); } I am guessing that it has to do with the CActiveForm...?
  6. Hi, I have tried implementing the code for a new login from the example at this link... http://www.larryullm...-yii-framework/ When I (try) to login, this Error appears... cException - LoginForm.rememberMe" is not defined. /opt/yii/framework/web/helpers/CHtml.php(2063) 1. The stack trace highlited the remember me code even though it was commented out. So I am assuming that <!-- out code --> is not good enough and the code should be removed. Confirm? 2. Larry's code has CHtml with the label and textfield. Is that to make these labels for this paticular form unique for this instance only? 3. Also, the descriptions I found for 'activeLabel' and 'activeLabelEx' are exactly the same (Generates a label tag for a model attribute.) so how does one determine which to use? Larry's code: <div> <?php echo CHtml::activeLabel($form,'email'); ?> <?php echo CHtml::activeTextField($form,'email') ?> </div> My code: <div class="row"> <?php echo $form->labelEx($model,'email'); ?> <?php echo $form->textField($model,'email'); ?> <?php echo $form->error($model,'email'); ?> </div> <div class="row"> <?php echo $form->labelEx($model,'password'); ?> <?php echo $form->passwordField($model,'password'); ?> <?php echo $form->error($model,'password'); ?> <!-- <p class="hint"> Hint: You may login with <tt>demo/demo</tt>. </p> --> </div> <!-- <div class="row rememberMe"> <?php echo $form->checkBox($model,'rememberMe'); ?> <?php echo $form->label($model,'rememberMe'); ?> <?php echo $form->error($model,'rememberMe'); ?> </div> --> --> I am just beginning with Yii because I do not know PHP!
×
×
  • Create New...