多个参数传递URL并通过单击打开配置文件。 [英] Multiple parameter passing in URL and opening profile by click.

查看:70
本文介绍了多个参数传递URL并通过单击打开配置文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我发送邮件时发送一个链接,点击并打开一个网页。

 <   table     >  
< tr > < td > < a < span class =code-attribute> href =' http://www.mywebsite.com/profile-page.php?reg_id=$r1' 目标 =' _ blank' > 打开资料< / a > < / td > < / tr >
< / table >



点击此打开个人资料我想重定向在该位置打开一个配置文件,但页面profile-page.php中的
我没有会话时使用会话重定向。



Q1-我可以在参数中传递会话值,如果是,那么如何?

Q2-如何通过点击打开个人资料链接查看直接个人资料?



当前发生的事情。

当用户点击链接时因为这段代码它重定向到主页

 if(!$ _ SESSION ['  user_name'])
{

header( 位置:http://www.mywebsite.com/);在profile-page.php中
}





如果有人有解决方案或任何建议请回复。



谢谢

解决方案

r1' target =' _ blank' > 打开个人资料< / a > < / td > < / tr >
< / table >



点击此打开个人资料我想要redire ct并在该位置打开一个配置文件,但在页面profile-page.php中打开
我没有会话时使用会话重定向。



Q1-我可以在参数中传递会话值,如果是,那么如何?

Q2-如何通过点击打开个人资料链接查看直接个人资料?



当前发生的事情。

当用户点击链接时,由于此代码,它会重定向到主页

 if (!


_SESSION [' user_name'])
{

header( location:http://www.mywebsite.com/ );在profile-page.php中
}





如果有人有解决方案或任何建议请回复。



谢谢


首先你可以发送会话变量。你必须用你的网址嵌入它们,但你不能自动期望你的会话自动获得。

可能的解决方案,例如:

 <     >  
< tr >
< td >
< a href =' http: //www.mywebsite.com/profile-page.php?reg_id =

hi,
I am send sending a mail with a link to click and open a webpage.

<table >
<tr><td ><a href='http://www.mywebsite.com/profile-page.php?reg_id=$r1' target='_blank' >Open Profile</a></td></tr>
</table>


By clicking this "Open Profile" i want to redirect and open a profile in the location but
in page "profile-page.php" i using session redirect if no session.

Q1- Can i pass a session value in parameter if yes then how?
Q2- How the person can see direct profile by clicking " Open Profile link"?

What happening in current.
When user click the link it redirect to home page because of this code

if(!$_SESSION['user_name'])
{

header("location:http://www.mywebsite.com/");
}

in profile-page.php.

If anyone have the solution or any suggestion pls reply.

Thanks

解决方案

r1' target='_blank' >Open Profile</a></td></tr> </table>


By clicking this "Open Profile" i want to redirect and open a profile in the location but
in page "profile-page.php" i using session redirect if no session.

Q1- Can i pass a session value in parameter if yes then how?
Q2- How the person can see direct profile by clicking " Open Profile link"?

What happening in current.
When user click the link it redirect to home page because of this code

if(!


_SESSION['user_name']) { header("location:http://www.mywebsite.com/"); }

in profile-page.php.

If anyone have the solution or any suggestion pls reply.

Thanks


First of all you can send session variable. you will have to embed them with your url, but you can't automatically expect that your session to get automatically.
the possible solution, as example:

<table >
  <tr>
     <td >
          <a href='http://www.mywebsite.com/profile-page.php?reg_id=


这篇关于多个参数传递URL并通过单击打开配置文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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