Я хочу передать параметр в метод действия, потому что я не могу передать параметр в заголовок.
<form name="mailinglist1" method="post" action="report1.php" >
в этой форме я использую кнопку загрузки для подключения моего отчета (html)
$st1= 3106530;
header('Location: report1.php?num='.$st1 );
полное кодирование
<?php
include("config/config.php");
include("header.php");
if(isset($_POST['search'])){
$query1 = mysql_query("SELECT * from staff where staff_code=".$_POST['staff']);
$row = mysql_fetch_array($query1);
$query2=mysql_query("SELECT * from master_tab where
deo_code =".$_POST['staff']
);
$query3 =mysql_query("select * from staff_bankinfo where staff_code=".$_POST['staff']);
$row1 = mysql_fetch_array($query3);
}
else if(isset($_POST['contact']))
{
mysql_query("INSERT into staff_bankinfo (staff_code, bank_name,branch,ifsc,acno) values('$_POST[staf]', '$_POST[bank_name]','$_POST[branch]','$_POST[ifsc]','$_POST[acno]')") or die(mysql_error());
$msg= "Added";
}
else
{
//$sheet_no = 202565;
//header('Location: print_edit_mark_details.php?num='.$sheet_no);
header('Location: report1.php?num='.$_POST['staff']);
// echo "hai";
}
?>
<?php include("theme.php"); ?>
</div><!-- /.ace-settings-container -->
<form method="post" id="form_id" class="form-horizontal" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data">
<td align="center" colspan="6">
<select name="staff" required>
<option value="">Select Staff</option>
<?php
//dropdwon list based on query1
<?php } ?>
</select>
</td>
<!--2 input item from_date and to_date -->
<label for="mindate">From<span class="important"></span></label>
<td align="center">
<input type="date" name="mindate" id="login_id" placeholder="st date" value="<?php echo isset($_POST['mindate']) ? $_POST['mindate'] : '' ?>" required> </td>
<label for="maxdate">To<span class="important"></span></label>
<td align="center"><input type="date" name="maxdate" id="login_id" placeholder="end date" value="<?php echo isset($_POST['maxdate']) ? $_POST['maxdate'] : '' ?>" required> </td>
<td align="center"><input name="search" type="submit" id="search" value="Submit" class="last btn btn-info"/></td>
<br />
<br />
</form>
<form name="mailinglist1" method="post" action="report1.php" >
<div class="row">
<div class="col-xs-12">
<div class="table-header">
Staff Details
</div>
<br />
<div class="form-group">
<!-- input item 1 fetched result from query1 -->
</div>
<div class="form-group">
<!-- input item 2 fetched result from query1 -->
</div>
</div>
<div class="form-group">
<!-- input item 3 fetched result from query1 -->
</div>
<div class="form-group">
<!-- input item 4 fetched result from query1 -->
</div>
<div class="form-group">
<!-- input item 5 fetched result from query1 -->
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-xs-12">
<div class="table-header">
Bank Details
</div>
<br />
<div class="form-group">
<label class="col-sm-3 control-label no-padding-right" for="form-field-1">Bank Name
<span class="important"></span></label>
<div class="col-sm-9">
<!-- input item 1 fetched result from query3 -->
</div>
<div class="form-group">
<!-- input item 2 fetched result from query3 -->
</div>
</div>
<div class="form-group">
<!-- input item 3 fetched result from query3 -->
</div>
</div>
<div class="form-group">
<!-- input item 4 fetched result from query3 -->
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-xs-12">
<div class="table-header">
listing
</div>
<!-- div.table-responsive -->
<!-- div.dataTables_borderWrap -->
<div>
<table id="dynamic-table" name="dynamic-table" class="table table-striped table-bordered table-hover">
<thead>
<!--table fetched values from query2 -->
</table>
</div>
</div>
</div>
</div><!-- /.page-content -->
</div>
</div>
<br/>
<div align="center">
<input name="contact" type="submit" id="contact" value="Update" style="padding:5px" class="sendButton" disabled />
<input name="download" type="submit" id="download" value="Download PDF" style="padding:5px" class="btn btn-danger" />
</div>
</label>
</div>
</form>
</div><!-- /.main-content -->
<div class="footer">
<!-- footer -->
</div>
</div><!-- /.main-container -->
PDF загружен, но не получает $ _GET ('num') в report1.php.как узнать, передан ли параметр или нет.я приложил полное кодирование моей страницы.