public function actionWishRemove() { if (!Yii::app()->request->isAjaxRequest) { exit; } $wish = wish::model()->findByPk($_GET['id']); if ($wish) { $wish->delete(); Yii::app()->user->setFlash('user', "Delete a item from wishlist!"); echo "Success!"; } else { echo "Failed!"; } }
<body> <center> <a href ="menu.php" class = "uno">Volver...</a> <div class ="maik"> <h3 class = "title">Lista De Tus Comentarios</h3> <?php include "../model/wish.php"; $wish = new wish(); ?> <table id="tabla"> <tr> <th>TITULO</th><th>DESCRIPTION</th> </tr> <?php $wish->wish_list(); ?> </table>
<?php include "../model/wish.php"; $title = $_POST['title']; $deseo = $_POST['deseo']; $wish = new wish(); $wish->edit($title, $deseo);
<?php include "../model/wish.php"; $user = $_POST['usuario']; $pass = $_POST['pass']; $wish = new wish(); $wish->login($user, $pass);
<?php include "../model/wish.php"; $nombre = $_POST['nombre']; $apellido = $_REQUEST['apellido']; $usuario = $_REQUEST['usuario']; $pass1 = $_REQUEST['pass1']; $pass2 = $_REQUEST['pass2']; $wish = new wish(); $igual = $wish->verificar($pass1, $pass2); if ($igual == true) { $wish->registrar($nombre, $apellido, $usuario, $pass1); } else { if ($igual == false) { echo "<h1> LAS CONTRASEÑAS NO COINCIDEN</h1>"; } }
<?php include "../model/wish.php"; $title = $_POST['title']; $deseo = $_POST['deseo']; $wish = new wish(); $wish->add_wish($title, $deseo);
<?php include "../model/wish.php"; $title = $_POST['title']; $wish = new wish(); $wish->drop($title);