I need help calling "$point" from User Table... I'm getting this
error...
Notice (8): Undefined index: data [CORE/app/controllers/
videos_controller.php, line 17] Apparently, I admit,.. lol... I don't
know how to do this in CAKE. Can some one please help... This is what
I have:
in my controller:
function admin_points()
{
$point=$_POST['data']['User']['featured_video_points'];
// print_r($point);
if($point!='') {
$sql="UPDATE fociki_users SET featured_video_points= '".
$point."' ";
mysql_query($sql) or die(mysql_error());
$this->flash('notice', ucfirst(i18n::translate('Points Successfuly
Updated')));
}
$res=mysql_fetch_array(mysql_query("select featured_video_points
from fociki_users "));
$result=$res['featured_video_points'];
$this->set('points', $result);
}
and in my ../videos/admin_points.ctp I have:
<form id="admin_points" method="post" >
<table style="width: 645px;" align="center">
<tr>
<th><label for="UserFeaturedVideoPoints"><?php echo
ucfirst(__('Enter Points in Mulitiplication', true)) ?></label></th>
<td><?php echo $form->text('User/featured_video_points',
array('value' => $points ,'style' => 'width: 200px')) ?></td>
</tr>
</table>
<p>
<div class="buttons" style="float: right; margin-right: 60px;">
<button type="submit" class="positive">
<?php echo $html->image('tick.png') ?>
<?php echo ucfirst(__('save', true)) ?>
</button>
</div>
</p>
<div class="clr"></div>
</form>
Can some one please teach me how to do this in CAKE and not get any
error.
THANKS
chris
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment