How can i Transfer my textbox value to the next page? $POST tag creates an error.

Recommended Answers

All 2 Replies

posting your code with code tags will be helpful for us.

posting your code with code tags will be helpful for us.

This is the first page where i have used the textbox.

$fname = odbc_result($result, 4);
$mname = odbc_result($result, 5);
$lname = odbc_result($result, 3);
$sy = odbc_result($result1, 1);
$sem = odbc_result($result1, 2);
$username2 = $_POST['stud_no'];
$Choose = $_POST['Course'];
$Year = $_POST['Level'];        


   echo "
       <table width='70%'>\n
    <tr><th align='left'><Font color='white' size='5'>Student No.:</font></th>
        <td align='left'colspan='2'><input type='text' name='stud_no' value='$username2'  STYLE='color: Black;'></td>


      </tr> 
      <tr><th align='left'><Font color='white' size='5'>Name:</font></th></font>
        <td align='left' colspan='2'><Font color='white' size='5'><input type='text' name='full' value='$fname $mname $lname' disabled='true' size='30' STYLE='color: Black;'></font></td>
            </tr> 
      <tr><td align='left'><Font color='white' size='4'>School Yr: </font></th>
      <td align='left'colspan='2'><Font color='white' size='4'><input type='text' name='school_yr' value='$sy' disabled='true' STYLE='color: Black;'></font></th>
        </tr>
      <tr><td align='left'><Font color='white' size='4'>Semester: </font></th>
      <td align='left'colspan='2'><Font color='white' size='4'><input type='text' name='sem' value='$sem' disabled='true' STYLE='color: Black;'></font></td>

    ";


    $Choose = $_POST['Course'];
        if ( $Choose == 'BEED' ) {
        echo "\n

            <tr><th align='left'><Font color='white' size='4'>Course</font></th>
            <td align='left' colspan='2'><Font color='white' size='3'><input type='text' name='BEED' value='Bachelor of Elementary Education'   size='60' STYLE='color: Black;'></font></td>
        </tr>


    ";}

    $Choose = 'Course';
    $Choose = $_POST['Course'];
        if ( $Choose == 'BSBA' ) {
        echo "\n

            <tr><th align='left'><Font color='white' size='4'>Course</font></td>
            <td align='left' colspan='2'><Font color='white' size='3'><input type='text' name='BSBA' value='Bachelor of Science in Business Administration' size='60' STYLE='color: Black;'></font></td>
        </tr>


    ";}

On the next page, i wanted to preview again thid information.
How can i do that?
Should i just Copy the Codes for the next page?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.