将数组中的唯一会话传递到简历查看器页面,并能够返回和查看其他结果
我试图在数组中传递一个唯一的jobseekerid,以便调用他们唯一的简历信息。但它只为我提供与其中一个领域相关的相同信息,当我转到其他领域时,它不会改变。我尝试了会话销毁但出现了一些错误。请帮忙。
简历查看器:
<?php
session_start();
$jobseekerid = $_SESSION['jobseekerid'];
$connect = mysql_connect("localhost","root","");
mysql_select_db("jobmerger");
// sending query
$result = mysql_query("SELECT * FROM resume WHERE jobseekerid = $jobseekerid");
if (!$result) {
die("Query to show fields from table failed");
}
while ($row = mysql_fetch_assoc($result)) {
$employer_name_1a = $row['employer_name_1'];
$employer_address_1a = $row['employer_address_1'];
$job_1_datesa = $row['job_1_dates'];
$job_1_titlea = $row['job_1_title'];
$job_1_dutiesa = $row['job_1_duties'];
$employer_name_2a = $row['employer_name_2'];
$employer_address_2a = $row['employer_address_2'];
$job_2_datesa = $row['job_2_dates'];
$job_2_titlea = $row['job_2_title1'];
$job_2_dutiesa = $row['job_2_duties'];
$employer_name_3a = $row['employer_name_3'];
$employer_address_3a = $row['employer_address_3'];
$job_3_datesa = $row['job_3_dates'];
$job_3_titlea = $row['job_3_title'];
$job_3_dutiesa = $row['job_3_duties'];
$employer_name_4a = $row['employer_name_4'];
$employer_address_4a = $row['employer_address_4'];
$job_4_datesa = $row['job_4_dates'];
$job_4_titlea = $row['job_4_title'];
$job_4_dutiesa = $row['job_4_duties'];
$skillsa = $row['skills'];
$native_languagea = $row['native_language'];
$language_1a = $row['language_1'];
$language_1_levela = $row['language_1_level'];
$language_2a = $row['language_2'];
$language_2_levela = $row['language_2_level'];
$language_3a = $row['language_3'];
$language_3_levela = $row['language_3_level'];
$education_levela = $row['education_level'];
$school_1_namea = $row['school_1_name'];
$school_1_coursesa = $row['school_1_courses'];
$school_1_datesa = $row['school_1_dates'];
$school_1_degreea = $row['school_1_degree'];
$school_2_namea = $row['school_2_name'];
$school_2_coursesa = $row['school_2_courses'];
$school_2_datesa = $row['school_2_dates'];
$school_2_degreea = $row['school_2_degree'];
$school_3_namea = $row['school_3_name'];
$school_3_coursesa = $row['school_3_courses'];
$school_3_datesa = $row['school_3_dates'];
$school_3_degreea= $row['school_3_degree'];
}
mysql_free_result($result);
?>
complexsearch.php
<?php
session_start();
$jobseekerid = $_SESSION['jobseekerid'];
$connect = mysql_connect("localhost","root","");
mysql_select_db("jobmerger");
// sending query
$result = mysql_query("SELECT * FROM resume WHERE jobseekerid = $jobseekerid");
if (!$result) {
die("Query to show fields from table failed");
}
while ($row = mysql_fetch_assoc($result)) {
$employer_name_1a = $row['employer_name_1'];
$employer_address_1a = $row['employer_address_1'];
$job_1_datesa = $row['job_1_dates'];
$job_1_titlea = $row['job_1_title'];
$job_1_dutiesa = $row['job_1_duties'];
$employer_name_2a = $row['employer_name_2'];
$employer_address_2a = $row['employer_address_2'];
$job_2_datesa = $row['job_2_dates'];
$job_2_titlea = $row['job_2_title1'];
$job_2_dutiesa = $row['job_2_duties'];
$employer_name_3a = $row['employer_name_3'];
$employer_address_3a = $row['employer_address_3'];
$job_3_datesa = $row['job_3_dates'];
$job_3_titlea = $row['job_3_title'];
$job_3_dutiesa = $row['job_3_duties'];
$employer_name_4a = $row['employer_name_4'];
$employer_address_4a = $row['employer_address_4'];
$job_4_datesa = $row['job_4_dates'];
$job_4_titlea = $row['job_4_title'];
$job_4_dutiesa = $row['job_4_duties'];
$skillsa = $row['skills'];
$native_languagea = $row['native_language'];
$language_1a = $row['language_1'];
$language_1_levela = $row['language_1_level'];
$language_2a = $row['language_2'];
$language_2_levela = $row['language_2_level'];
$language_3a = $row['language_3'];
$language_3_levela = $row['language_3_level'];
$education_levela = $row['education_level'];
$school_1_namea = $row['school_1_name'];
$school_1_coursesa = $row['school_1_courses'];
$school_1_datesa = $row['school_1_dates'];
$school_1_degreea = $row['school_1_degree'];
$school_2_namea = $row['school_2_name'];
$school_2_coursesa = $row['school_2_courses'];
$school_2_datesa = $row['school_2_dates'];
$school_2_degreea = $row['school_2_degree'];
$school_3_namea = $row['school_3_name'];
$school_3_coursesa = $row['school_3_courses'];
$school_3_datesa = $row['school_3_dates'];
$school_3_degreea= $row['school_3_degree'];
}
mysql_free_result($result);
?>
I am trying to pass on a unique jobseekerid in the array so as to call up their unique resume information. But it’s only providing me with the same information relating to one of the fields and not changing when I go to the others. I tried session destroy but got some errors. Please help.
Resume viewer:
<?php
session_start();
$jobseekerid = $_SESSION['jobseekerid'];
$connect = mysql_connect("localhost","root","");
mysql_select_db("jobmerger");
// sending query
$result = mysql_query("SELECT * FROM resume WHERE jobseekerid = $jobseekerid");
if (!$result) {
die("Query to show fields from table failed");
}
while ($row = mysql_fetch_assoc($result)) {
$employer_name_1a = $row['employer_name_1'];
$employer_address_1a = $row['employer_address_1'];
$job_1_datesa = $row['job_1_dates'];
$job_1_titlea = $row['job_1_title'];
$job_1_dutiesa = $row['job_1_duties'];
$employer_name_2a = $row['employer_name_2'];
$employer_address_2a = $row['employer_address_2'];
$job_2_datesa = $row['job_2_dates'];
$job_2_titlea = $row['job_2_title1'];
$job_2_dutiesa = $row['job_2_duties'];
$employer_name_3a = $row['employer_name_3'];
$employer_address_3a = $row['employer_address_3'];
$job_3_datesa = $row['job_3_dates'];
$job_3_titlea = $row['job_3_title'];
$job_3_dutiesa = $row['job_3_duties'];
$employer_name_4a = $row['employer_name_4'];
$employer_address_4a = $row['employer_address_4'];
$job_4_datesa = $row['job_4_dates'];
$job_4_titlea = $row['job_4_title'];
$job_4_dutiesa = $row['job_4_duties'];
$skillsa = $row['skills'];
$native_languagea = $row['native_language'];
$language_1a = $row['language_1'];
$language_1_levela = $row['language_1_level'];
$language_2a = $row['language_2'];
$language_2_levela = $row['language_2_level'];
$language_3a = $row['language_3'];
$language_3_levela = $row['language_3_level'];
$education_levela = $row['education_level'];
$school_1_namea = $row['school_1_name'];
$school_1_coursesa = $row['school_1_courses'];
$school_1_datesa = $row['school_1_dates'];
$school_1_degreea = $row['school_1_degree'];
$school_2_namea = $row['school_2_name'];
$school_2_coursesa = $row['school_2_courses'];
$school_2_datesa = $row['school_2_dates'];
$school_2_degreea = $row['school_2_degree'];
$school_3_namea = $row['school_3_name'];
$school_3_coursesa = $row['school_3_courses'];
$school_3_datesa = $row['school_3_dates'];
$school_3_degreea= $row['school_3_degree'];
}
mysql_free_result($result);
?>
complexsearch.php
<?php
session_start();
$jobseekerid = $_SESSION['jobseekerid'];
$connect = mysql_connect("localhost","root","");
mysql_select_db("jobmerger");
// sending query
$result = mysql_query("SELECT * FROM resume WHERE jobseekerid = $jobseekerid");
if (!$result) {
die("Query to show fields from table failed");
}
while ($row = mysql_fetch_assoc($result)) {
$employer_name_1a = $row['employer_name_1'];
$employer_address_1a = $row['employer_address_1'];
$job_1_datesa = $row['job_1_dates'];
$job_1_titlea = $row['job_1_title'];
$job_1_dutiesa = $row['job_1_duties'];
$employer_name_2a = $row['employer_name_2'];
$employer_address_2a = $row['employer_address_2'];
$job_2_datesa = $row['job_2_dates'];
$job_2_titlea = $row['job_2_title1'];
$job_2_dutiesa = $row['job_2_duties'];
$employer_name_3a = $row['employer_name_3'];
$employer_address_3a = $row['employer_address_3'];
$job_3_datesa = $row['job_3_dates'];
$job_3_titlea = $row['job_3_title'];
$job_3_dutiesa = $row['job_3_duties'];
$employer_name_4a = $row['employer_name_4'];
$employer_address_4a = $row['employer_address_4'];
$job_4_datesa = $row['job_4_dates'];
$job_4_titlea = $row['job_4_title'];
$job_4_dutiesa = $row['job_4_duties'];
$skillsa = $row['skills'];
$native_languagea = $row['native_language'];
$language_1a = $row['language_1'];
$language_1_levela = $row['language_1_level'];
$language_2a = $row['language_2'];
$language_2_levela = $row['language_2_level'];
$language_3a = $row['language_3'];
$language_3_levela = $row['language_3_level'];
$education_levela = $row['education_level'];
$school_1_namea = $row['school_1_name'];
$school_1_coursesa = $row['school_1_courses'];
$school_1_datesa = $row['school_1_dates'];
$school_1_degreea = $row['school_1_degree'];
$school_2_namea = $row['school_2_name'];
$school_2_coursesa = $row['school_2_courses'];
$school_2_datesa = $row['school_2_dates'];
$school_2_degreea = $row['school_2_degree'];
$school_3_namea = $row['school_3_name'];
$school_3_coursesa = $row['school_3_courses'];
$school_3_datesa = $row['school_3_dates'];
$school_3_degreea= $row['school_3_degree'];
}
mysql_free_result($result);
?>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该仅将 jobseekerid 传递给resumerviewer.php
echo "
$jobseekerid
$jobseekerfirstname $jobseekerlastname
$jobseekeremail
$求职者地址
$jobseekerphoneno
简历信息
";
在resumerviewer.php
$run = mysql_query('SELECT * FROM
jobseekers
WHEREjobseekerid
=' . intval($_GET['id']));if(mysql_num_rows($run))
{
$row = mysql_fetch_assoc($run);
print_r($行);
}
You should pass only jobseekerid to resumerviewer.php
echo "
$jobseekerid
$jobseekerfirstname $jobseekerlastname
$jobseekeremail
$jobseekeraddress
$jobseekerphoneno
Resume information
";
in resumerviewer.php
$run = mysql_query('SELECT * FROM
jobseekers
WHEREjobseekerid
=' . intval($_GET['id']));if(mysql_num_rows($run))
{
$row = mysql_fetch_assoc($run);
print_r($row);
}