Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8256487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:52:29+00:00 2026-06-08T01:52:29+00:00

I have made 2 php pages. One page is doc.php and other is chkval.php.

  • 0

I have made 2 php pages. One page is “doc.php” and other is “chkval.php”. I have used some javascript code to generate textfields in “doc.php”. And by using $POST , I am trying to catch textfield values in “chkval.php” page, but the textfield values are not being catched with the error

Use of undefined constant regCardRecp – assumed ‘regCardRecp’ in
D:\wamp\www\chkval.php on line 3 regCardRecp

Below is my Complete code.

doc.php

<html>
<head>
<title>Record Entry</title>


<script type="text/javascript">

        window.onload = function()
        {
            var select = document.getElementById("select");
            var texts = document.getElementById("texts");
            select.onchange = function()
            {
                var val = select.options[select.selectedIndex].value;
                texts.innerHTML = "";


                if(val==9 ){

                texts.innerHTML += '<div>Reg Card Reception Date (SSC): <input type="text" name="regCardRecp" id="regCardRecp"></div>'
                texts.innerHTML += '<div>Reg Card Issue Date (SSC):<input type="text" name="regCardIss" id="regCardIss">'

                texts.innerHTML += '<div>Roll no Slip Reception Date (SSC):<input type="text" name="rollSlipRecp" id="rollSlipRecp"></div>'
                 texts.innerHTML += '<div>Roll no Slip Issue Date (SSC):<input type="text" name="rollSlipIss" id="rollSlipIss"></div>'    

                texts.innerHTML += '<div>Marks Sheet Reception Date (SSC-I):<input type="text" name="marksheetRecpI" id="marksheetRecpI"/></div>'
                texts.innerHTML += '<div>Marks Sheet Issue Date (SSC-I):<input type="text" name="marksheetIssI" id="marksheetIssI"/></div>'

                texts.innerHTML += '<div>Result (SSC-I):<input type="radio" name="Sresult" value="pass" /> Pass<input type="radio" name="Sresult" value="fail" /> Fail</div>'




                }
                if(val==10 ){
                      texts.innerHTML += '<div>Marks Sheet Reception Date (SSC-II):<input type="text" name="marksheetRecpII" id="marksheetRecpII"></div>'
                      texts.innerHTML += '<div>Marks Sheet Issue Date (SSC-II):<input type="text" name="marksheetIssII" id="marksheetIssII"></div>'


                      texts.innerHTML += '<div>Certificate Reception Date (SSC):<input type="text" name="certRecp" id="certRecp"></div>'
                      texts.innerHTML += '<div>Certificate Issue Date (SSC):<input type="text" name="certIss" id="certIss"></div>'

                      texts.innerHTML += '<div>Result (SSC-II):<input type="radio" name="Sresult1" value="pass" /> Pass<input type="radio" name="Sresult1" value="fail" /> Fail</div>'

                      //  texts.innerHTML += '<div></div>'

                      };

                if( val==11){

                      texts.innerHTML += '<div>Reg Card Reception Date (HSSC):<input type="text" name="HhregCardRecp" id="HregCardRecp"></div>'
                      texts.innerHTML += '<div>Reg Card Issue Date (HSSC):<input type="text" name="HregCardIss" id="HregCardIss">'

                      texts.innerHTML += '<div>Roll no Slip Reception Date (HSSC):<input type="text" name="HrollSlipRecp" id="HrollSlipRecp"></div>'
                      texts.innerHTML += '<div>Roll no Slip Issue Date (HSSC):<input type="text" name="HrollSlipIss" id="HrollSlipIss"></div>'


                      texts.innerHTML += '<div>Marks Sheet Reception Date (HSSC-I):<input type="text" name="HmarksheetRecpI" id="HmarksheetRecpI"></div>'
                      texts.innerHTML += '<div>Marks Sheet Issue Date (HSSC-I):<input type="text" name="HmarksheetIssI" id="HmarksheetIssI"></div>'

                      texts.innerHTML += '<div>Result (HSSC-I):<input type="radio" name="Hresult" value="pass" /> Pass<input type="radio" name="Hresult" value="fail" /> Fail</div>'





                };

                if(val==12 ){

                      texts.innerHTML += '<div>Marks Sheet Reception Date (HSSC-II):<input type="text" name="HmarksheetRecpII" id="HmarksheetRecpII"></div>'
                      texts.innerHTML += '<div>Marks Sheet Issue Date (HSSC-II):<input type="text" name="HmarksheetIssII" id="HmarksheetIssII"></div>'


                      texts.innerHTML += '<div>Certificate Reception Date (HSSC):<input type="text" name="HcertRecp" id="HcertRecp"></div>'
                      texts.innerHTML += '<div>Certificate Issue Date (HSSC):<input type="text" name="HcertIss" id="HcertIss"></div>'

                      texts.innerHTML += '<div>Result (HSSC-II):<input type="radio" name="Hresult1" value="pass" /> Pass<input type="radio" name="Hresult1" value="fail" /> Fail</div>'


                };






            }
        }

    </script>


</head>
<body>


<form id="myform" method="post" action="chkval.php" onSubmit="chkval.php">

<h1 align="center">Documents Record Entry</h1>
<table width=50% align = 'center'>

<tr><td>Session:</td><td>
<select name="session">
<option value="19">19</option>
<option value="20">20</option>
</select>

<select name="session">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
</select>

-

<select name="session">
<option value="01">01</option>
<option value="02">02</option>
<option value="03">03</option>
<option value="04">04</option>
<option value="05">05</option>
<option value="06">06</option>
<option value="07">07</option>
<option value="08">08</option>
<option value="09">09</option>
<option value="10">10</option>
</select>
</td></tr>

<tr>
<td>
Name:
</td>
<td>
<input type="text" name="name" id="name">
</td>

<td>
Board:
</td>
<td>
<input type="text" name="board" id="board">
</td>
</tr>


<tr><td>Class:</td><td>
<select id="select" size="1" name="class" >
<option value="1" >1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">Matric-I</option> 
<option value="10">Matric-II</option>
<option value="11" >HSSC-I</option>
<option value="12">HSSC-II</option>
<option value="13">Bachelor</option>


</select>
<hr/>

        <div id="texts"></div></td></tr>


<td>

</td>



<br>
</td>
<tr><td>Remarks:<textarea name="remarks" cols="24" rows="3"></textarea></td></tr>
<td>
<input type="submit" name="submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>

chkval.php

<?php
$regCardRecp = $_POST['regCardRecp'];
echo(regCardRecp);

?>

Any help will be greatly appreciated.. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:52:30+00:00Added an answer on June 8, 2026 at 1:52 am

    your problem is here you are just mising a $ symbol on your echo (regCardRecp);

    <?php
    
        $regCardRecp = $_POST['regCardRecp'];
        echo($regCardRecp);
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made one file say a.php. Now I want some thing like if
I have made a php page that sends an email message with multiple attachments.
My permalink structure is set so I have url.com/page I made a basic PHP
I have made a Web page using jquery and php where all files are
I have two web pages which work basically the same, code-wise, but one of
i have made a simple php contact form following this tutorial: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme The big
I have made a very successful PHP chat box that saves the chat to
i have made a server using php. The server is getting new information after
I have made a simple chat application in PHP/Ajax/MySQL. I am regularly calling these
I have made simple encryption/decryption method in php that I'm trying to move to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.