Problem in fetching values passed thru form
Permalink
Hi guys,
I have a form in concrete/elements/files/one.php from where i m passing a value thru a hidden form to b fetched in a file in concrete/single_pages/two.php.
I have the single page using anchor tag as i need to open d single page from a popup n passed the form value along with the anchor tag in its onclick event like dis:
concrete/elements/files/one.php
dis is d form:
<form name="frm_ref" id="frm_ref" method="post">
<input type="text" id="p_cid" name="pagecid" value="hello">
here, the two.php is called & hidden form values passed:
<a id="add-new-album" id="add_new_album" class="add_new_album" href="<?php echo $this->url('/two')?>" onclick="document.frm_ref.submit(); return f
alse;">Add Your Album</a>
but, the i cudnt fetch the value in two.php, i m fetching like dis:
concrete/single_pages/two.php
$pcID = $_POST['pagecid']
I have also tried $_REQUEST for getting its value, but with no success
have i opened two.php with wrong url?? I mean, one.php is somewhere else n two.php is somewhere else.What have I done wrong?
Kindly suggest
Thnx.
I have a form in concrete/elements/files/one.php from where i m passing a value thru a hidden form to b fetched in a file in concrete/single_pages/two.php.
I have the single page using anchor tag as i need to open d single page from a popup n passed the form value along with the anchor tag in its onclick event like dis:
concrete/elements/files/one.php
dis is d form:
<form name="frm_ref" id="frm_ref" method="post">
<input type="text" id="p_cid" name="pagecid" value="hello">
here, the two.php is called & hidden form values passed:
<a id="add-new-album" id="add_new_album" class="add_new_album" href="<?php echo $this->url('/two')?>" onclick="document.frm_ref.submit(); return f
alse;">Add Your Album</a>
but, the i cudnt fetch the value in two.php, i m fetching like dis:
concrete/single_pages/two.php
$pcID = $_POST['pagecid']
I have also tried $_REQUEST for getting its value, but with no success
have i opened two.php with wrong url?? I mean, one.php is somewhere else n two.php is somewhere else.What have I done wrong?
Kindly suggest
Thnx.
If your form handler is on
then your controller should be at the following, I believe:
Alternatively:
and
If your form has the action specified,
then your controller would need
so your single page (view.php or two.php, depending on whether or not you've got them in a subdirectory) would then be capable of displaying the submitted values.
You might want to check
http://www.concrete5.org/documentation/developers/pages/single-page...
for a quick rundown of Single Pages, and hit the link at the bottom for a complete walk through.
btw, all d misspellings in dis post made it difficult to read; you may receive more responses in a shorter period otherwise: just a thought.
Good Luck!