PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, March 11, 2022

[FIXED] How to pass id through form action in cakephp

 March 11, 2022     cakephp-3.0, php     No comments   

Issue

I was trying to pass the last inserted id through form action in Cakephp when i click on a button.

I am a newbie in Cakephp. Here is the code i found out. Can you suggest the correct method tho get the last inserted is through Form?

<?php  echo $this->Html->link('View Quote', array('controller' => 'Stockcheck', 'action' => '../Quote/QuoteNo=Q1-1'), array('class' => 'button'));  ?>

QuoteNo=Q1-1 should be my last inserted id and QuoteNo is my field


Solution

Try this code :


echo $this->Html->link('View Quote', array('controller' => 'Stockcheck', 'action' => '../Quote/', $your_id));

for more help please read this link



Answered By - Pradeep
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing