PHP buttons and variables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jason1987
    New Member
    • Sep 2007
    • 15

    PHP buttons and variables

    Hi,

    I am trying to display a variable on a button, but i just cant find a way of doing this, can anyone help? (line 9 where value =)


    [PHP]
    </table>
    <td>
    <form action="ithardw areadd.php" method="GET">
    <table border="0">
    <tr>
    <td><input type="hidden" name="jobid" value="<?php echo $jobid?>"></td>
    <td><input type="hidden" name="equid" value="<?php echo $equid?>"></td>
    <td><input type="hidden" name="userid" value="<?php echo $userid?>"></td>
    <td colspan="2"><in put class="button" onmouseover="th is.className='b utton btnhov'" onmouseout="thi s.className='bu tton'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
    <td>
    </form>
    </td>
    </table>
    </form>
    </td>
    [/PHP]
  • robin1983
    New Member
    • Oct 2007
    • 99

    #2
    The problem is in your code, because you did not terminate the php, you forgot to give ";" . <?php echo $jobid; ?>

    [PHP] <table border="0">
    <tr>
    <td><input type="hidden" name="jobid" value="<?php echo $jobid; ?>"></td>
    <td><input type="hidden" name="equid" value="<?php echo $equid; ?>"></td>
    <td><input type="hidden" name="userid" value="<?php echo $userid; ?>"></td>
    <td colspan="2"><in put class="button" onmouseover="th is.className='b utton btnhov'" onmouseout="thi s.className='bu tton'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
    <td>
    </form>
    </td>
    </table>[/PHP]
    but, you dont show where u assign the variable. ok try this i think it will work

    Originally posted by jason1987
    Hi,

    I am trying to display a variable on a button, but i just cant find a way of doing this, can anyone help? (line 9 where value =)


    [PHP]
    </table>
    <td>
    <form action="ithardw areadd.php" method="GET">
    [PHP]<table border="0">
    <tr>
    <td><input type="hidden" name="jobid" value="<?php echo $jobid?>"></td>
    <td><input type="hidden" name="equid" value="<?php echo $equid?>"></td>
    <td><input type="hidden" name="userid" value="<?php echo $userid?>"></td>
    <td colspan="2"><in put class="button" onmouseover="th is.className='b utton btnhov'" onmouseout="thi s.className='bu tton'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
    <td>
    </form>
    </td>
    </table>
    </form>
    </td>
    [/PHP]

    Comment

    Working...