如何将PHP变量从模式弹出传递到PHP中的另一个页面 [英] How to pass PHP variables from modal pop up to another page in PHP

查看:64
本文介绍了如何将PHP变量从模式弹出传递到PHP中的另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个来自应用按钮内部是否有点击按钮它显示弹出按钮你想申请这个工作,而点击按钮我传递坦诚和工作ID如果尝试回声这里值是显示。但是点击按钮后,它正在重定向另一个页面,其值没有通过。请提前帮助。谢谢。



我尝试过:



i have a from inside the apply button is there if click the button it is showing pop up button do you want to apply for this job while clicking the button i am passing the candid and job id if try to echo here value is showing .but after click the button it is redirecting another page there values are not passing.please any help .thanks in advance.

What I have tried:

include('assets/connection/session.php');
//this is another file which is showing yes or no message
include('../work_flow.php');
//here in href if echo the managerid and job_id pop up is not showing thats why i removed it <div style="padding-top:10px; padding-right:17px;">
		 <a href="../work_flow.php?cand_id=<?php  $managerID; ?>&job_id= <?php  $event_id; ?>" data-toggle='modal' data-target="#myModalHorizontal" data-backdrop="static" data-keyboard="false"><button type="button" class="btn btn-danger pull-right">APPLY JOB</button></a>

		</div>



//this is workflow file inside code
 if(isset($_GET['job_id']))
    {
    	//echo 'Do You really want to Apply for this Job with ID of'.$_GET['job_id'].'?<a href="work_flow.php?cand_id='.$_GET['cand_id'].'&yesapply='.$_GET['job_id'].'">Yes</a>|<a href="candidate/job.php">No</a>';
      echo '<div class="content" style="padding-left:20px; padding-bottom:25px;">
    	<br/>
    	<h5>Do You really want to Apply for this Job with ID of'. $_GET['job_id'].' </h5>   <a style class="btn btn-danger pull-left"  href="work_flow.php?cand_id='. $_GET['cand_id'].'&yesapply='.$_GET['job_id'].'"> YES</a><a class="btn btn-danger" href="job.php">NO</a>
    	</div>';
			echo "event id is".$_GET['event_id'];
			echo "candidate id is".$_GET['cand_id'];
    	exit(0);

    }
    if(isset($_GET['yesapply']))
    {
    $id_to_apply = $_GET['yesapply'];
    $cand_id = $_GET['cand_id'];
    $job_applied_date = date('Y-m-d H:i:s');
    $sql = mysql_query("INSERT INTO `sk_c_job_applications`(`job_app_job_id`, `job_app_cand_id`, `job_app_date`,`job_app_status`) VALUES ('$id_to_apply','$cand_id','$job_applied_date','APPLIED')") or die (mysql_error());
    header('location:candidate/job.php');
    }

推荐答案

managerID; ?>& job_id =<?php
managerID; ?>&job_id= <?php


event_id; ?> data-toggle = ' modal' data-target = #myModalHorizo​​ntal < span class =code-attribute> data-backdrop = static data-keyboard = false > < 按钮 type = 按钮 = btn btn-danger pull-right > 申请工作< / button > < / a >

< / div >



//这是代码内的工作流文件
if(isset(
event_id; ?>" data-toggle='modal' data-target="#myModalHorizontal" data-backdrop="static" data-keyboard="false"><button type="button" class="btn btn-danger pull-right">APPLY JOB</button></a> </div> //this is workflow file inside code if(isset(


_GET ['job_id']))
{
// echo'你真的想申请这个ID为'的工作。
_GET['job_id'])) { //echo 'Do You really want to Apply for this Job with ID of'.


这篇关于如何将PHP变量从模式弹出传递到PHP中的另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆