php - How to pass data from one page to another on click -


i realize may begginer's question, upon searching around, nothing seemed solve problem.

i need send information 1 page, page through button. haven't made code, don't know how works, know passes information other pages through onclick event. created page needs 1 information page, yet reason it's not working. it's sort of this:

if  (!empty($_get['short_proj_name'])){     $strqueryinfo = "select distinct proj_id,pcr projetos_main short_proj_name='".$_get['short_proj_name']."'";     $execinfo= mysql_query($strqueryinfo);     while($info = mysql_fetch_array($execinfo)){         $strprojid = $info['proj_id'];         $strpcr = $info['pcr'];     } }else{     $strpcr = $_post['txtpcr']; } 

so code selects "pcr" , "short_proj_name" fields. need pass "pcr" field other page. here button it.

<input type="submit" class="submit" onclick="window.open('test.com/main/modules/site_teste/about.php?pcr=<?=$strpcr?>', '_blank')" value="about"/> 

i tried using about.php?pcr=<?=$_get['pcr']?> instead of using $strpcr well, didn't work also. thought making form action redirects me page, don't know how works, couldn't function properly. there i'm missing? if there's information still have give please tell me

put button in form tag,example :

<form action="your page" method="post">    pcr: <input type="text" name="pcr">   <input type="submit" value="submit" class="submit"> </form> 

then in other page, can value :

$pcr= $_post['pcr']

hope works


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -