hidden html form in php with javascript -


i'm trying pass parameter html form in php, have php page fill html table:

$html = ''; $html .= '<form id="form1" action="search.php" method="post">'; $html .= '<tr>'; $html .= '<td>id</td>'; $html .= '<td><a href="javascript:;"onclick="document.getelementbyid(\'form1\').submit();">name</a></td>'; $html .= '<td>surname</td>'; $html .= '<td>language_id</td>'; $html .= '<td><span class="label label-success">status_code</span></td>'; $html .= '</tr>'; $html .= '<input type="hidden" name="mess" value=\'hello\'>'; $html .= '</form>'; 

i can see in html table, when click on href, search.php page it's open, can't see 'hello' value, search.php:

<?php  $name0 = $_post['mess']; echo $name0;  ?> 

what wrong?

the problem browser not php. browser wont show error. try this

<?php $html = ''; $html = '<table>'; $html .= '<form id="form1" action="search.php" method="post">'; $html .= '<tr>'; $html .= '<td>id</td>'; $html .= '<td><a href="javascript:;"onclick="document.getelementbyid(\'form1\').submit();">name</a></td>'; $html .= '<td>surname</td>'; $html .= '<td>language_id</td>'; $html .= '<td><span class="label label-success">status_code</span></td>'; $html .= '</tr>'; $html .= '<input type="hidden" name="mess" value=\'hello\'>'; $html .= '</form>'; $html .= '</table>'; echo $html; ?> 

and search.php

<?php  $name0 = $_post['mess']; echo $name0;  ?> 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -