John,
Yes it is making it that far !!
As I showed in my 1st post
http://10.1.39.52/maxmympg/vlogs/add/4
is what is seen in the browser URL.
The problem seems to be from what you told
me is that the "4" is not getting passed to the
vlogs_controller "add" action when the /vlogs/add
page is viewed or submitted. I have checked everything
I know to check and am not sure what to investigate
from here. I will paste the appropriate code from "vehicles"
index.thtml,
the vlogs_controller, and vlogs add.thtml below. If you
or anyone else has the time it would be appreciated
if they could sift through it and show me the errors of my ways.
Or possibly give me other avenues to investigate.
----- from the vehicles/index.html this creates a button that points to
/vlogs/add/$id !! ------
<td>
<?php echo
$html->formTag('/vlogs/add/'.$vehicle['Vehicle']['id'],'post')?>
<?php echo $html->Submit('Add Log') ?>
</form>
</td>
----------------- This is my vlogs "add.thtml" view !!
------------------------------
<h1>Add Log</h1>
<?php echo $html->formTag('/vlogs/add/)?>
<?php debug($id, $showHTML = true) ?>
<p>
<?php echo $html->tagErrorMsg('Vlog/odometer_reading', 'Odometer
Reading is required.') ?>
Odometer: <?php echo $html->input('Vlog/odometer_reading',
array('size'=>'30')) ?>
</p>
<p>
<?php echo $html->tagErrorMsg('Vlog/mpg', 'Miles per Gallon is
required.') ?>
MPG: <?php echo $html->input('Vlog/mpg', array('size'=>'30')) ?>
</p>
<p>
<?php echo $html->tagErrorMsg('Vlog/additives', 'Additives is Not is
required.') ?>
Additives: <?php echo $html->input('Vlog/additives',
array('size'=>'40')) ?>
</p>
<p>
<?php echo $html->tagErrorMsg('Vlog/conditions', 'Conditions not is
required.') ?>
Conditions: <?php echo $html->input('Vlog/conditions',
array('size'=>'80')) ?>
</p>
<p>
<?php echo $html->tagErrorMsg('Vlog/notes', 'Notes are Not required.')
?>
Comments:<br/>
<?php echo
$html->textarea('Vlog/notes',array('columns'=>'5','rows'=>'10')) ?>
</p>
<p>
<?php echo $html->submit('Save') ?>
</p>
</form>
-------------------------------- This is my VlogsController add action
!! --------------------------
function add($id)
{
if (empty($this->params['data']))
{
$this->render();
}
else
{
$this->params['data']['Vlog']['vehicle_id'] = $id ;
$this->Output->filter($this->params['data']);
$this->Sanitize->cleanArray($this->params['data']);
if ($this->Vlog->save($this->params['data']))
{
$this->flash('Your log has been
saved.','/vlogs');
}
else
{
$this->set('data', $this->params['data']);
$this->render();
}
}
}
--Any help is appreciated. I am very NEW to cakePHP
--thanx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---