Jump to content

sadboys

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sadboys

  • Rank
    Member
  1. Updated Code: public function actionLogin() { if (!Yii::$app->user->isGuest) { return $this->goHome(); } $model = new LoginForm(); if ($model->load(Yii::$app->request->post()) && $model->login()) { return $this->goBack(); } else { return $this->render('login', [ 'model' => $model, ]); } } I tried using the default user table and it works perfectly fine. However if I use my own user table with the other additional columns it doesn't w
  2. Hello, I'm currently using Yii2 Framework in developing my project. I encounter an error that whenever I try to login it always says "Incorrect Username or Password" even though my password is correct. I checked the user table in phpmyadmin and the password is getting hashed and there's no problem since the user information is stored in the user table without problems but if I try to login it doesn't accept the username or password. Anyone encounter a similar issue like mine? Here's the SignupForm.php class SignupForm extends Model { public $username; public $email; public $p
  3. Hello, I'm currently learning Google Maps API, I created a page that shows the Google Maps with custom markers. My problem is that the Google Maps works fine but the custom markers that I set does not work. Here's what I did. script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBSTRDm6eRdkpoVOB2VJVJgTCNgmcuDcq0&callback=initMap"> </script> <script> function initmap() { map = new google.maps.Map(document.getElementById('map'), { zoom: 16, center: new googl
  4. Yeah, in my db the default value is already "CURRENT_TIMESTAMP", but I want the time to be displayed on the form so what I did was like that. Thank you anyways
  5. I've already read that before but I thought I can also use the format of timestamp in mysql, I'm currently using "y-m-d h:i:s"
  6. Isn't this the proper format for timestamp - YYYY-MM-DD HH:MI:SS ?
  7. Hello, I need a little help here. I'm using Yii2 Framework In my TicketController, I have a function that if you create a ticket it will automatically get the system time. In time_start I used TIMESTAMP TicketController.php actionCreate $model->time_start = date('YYYY-MM-DD HH:MI:SS'); In the form it does not show the proper result Also in the view after the ticket is created it shows like this
  8. I don't get it can you explain to me? :/ Nevermind I get it now, the time_end supposed to be "On Update" Thank you for giving me an idea on how to fix it, I guess I still need to improve my sql skills thank you!
  9. I did some var dumps and still when I update it still updates and gets the current date and time. In actionCreate When I create something it gets the current date and time and it fills the $model->time_start = date('y-m-d h:i:s'); In order to fill in the time_end I need to update what I have created first which was in actionUpdate I added this $model->time_start = date('y-m-d h:i:s');
  10. Hi everyone! In my Ticket _form.php. When I create ticket it gets the current time and fills in the time_start field automatically, in order to fill in the field time_end I need to update the ticket which also gets the current time when you update it. My problem is when I update it the time_start also updates and now they have the same value which supposed to be different. I have this in my form: <?= $form->field($model, 'time_start')->textInput(['readOnly' => true]) ?> <?= $form->field($model, 'time_end')->textInput(['readOnly' => true]) ?> Which automati
  11. Hi everyone! In my Ticket _form.php. When I create ticket it gets the current time and fills in the time_start field automatically, in order to fill in the field time_end I need to update the ticket which also gets the current time when you update it. My problem is when I update it the time_start also updates and now they have the same value which supposed to be different. I have this in my form: <?= $form->field($model, 'time_start')->textInput(['readOnly' => true]) ?> <?= $form->field($model, 'time_end')->textInput(['readOnly' => true]) ?> Which automat
×
×
  • 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.