如何解决在PHP中检查isset $ POST时如何使用$ _GET
我有一个带有change-password.PHP?id = 1&key = 37759的网址
我正在尝试从url和usind的if语句中获取值,但遇到了麻烦。
VSC
但是如果我在它们外面回声,它会像这样:
render() {
console.log("sart_azmoon");
return (
<View style={{
backgroundColor: color.khakestarikam,width: '100%',height: '100%',}} >
<View style={{
marginLeft: "4%",marginRight: "4%",marginTop: 5,marginBottom: 30,borderBottomrighTradius: responsiveWidth(3),borderBottomLefTradius: responsiveWidth(3),}}>
<View style={{
backgroundColor: '#757575',borderTopRighTradius: responsiveWidth(3),borderTopLefTradius: responsiveWidth(3)
}}>
<Text style={{
color: "white",fontFamily: font.font_black,fontSize: responsiveFontSize(2.5),textAlign: "center",marginLeft: responsiveHeight(2),justifyContent: 'center'
}}>
</Text>
</View>
<View style={{
backgroundColor: 'white',}}>
<FlatList
// showsHorizontalScrollIndicator={false}
showsverticalScrollIndicator={false}
contentContainerStyle={{
flexGrow: 1,justifyContent: 'center',alignItems: 'center'
}}
style={{
width: '100%',backgroundColor: '#fff',marginTop: 4,// backgroundColor: 'yellow',}}
// horizontal={true}
// keyExtractor={(data) => data.ExamId}
data={this.state.GroupList}
renderItem={({ item,index }) =>
(
<GroupList
item={item}
/>
)
}
/>
<View style={{ height: responsiveHeight(5),}} />
</View>
</View>
<View style={{
flexDirection: "row",marginLeft: "4%",marginTop: 10,marginBottom: 0
}}>
<Text style={{
color: "#ff4646",textAlign: "left",justifyContent: 'center'
}}>
⬤
</Text>
<Text style={{
color: "#757575",fontSize: responsiveFontSize(1.7),marginTop: responsiveHeight(0.5),}}>
</Text>
</View>
<View style={{
flexDirection: "row",marginRight: responsiveHeight(4),marginBottom: 80
}}>
<Text style={{
color: "#ff4646",}}>
</Text>
</View>
</ScrollView>
</View>
);
}
}
export default start_azmoon;
这也行不通:
if (isset($_POST['password'])) {
$id = $_GET['id'];
$key = $_GET['key'];
echo $key; // this is empty
}
这是此页的完整代码 当用户要求重设密码时,将通过用户在其电子邮件中获得的链接设置change-password.PHP?id = 1&key = 37759。然后将使用以下代码将他们带到此页面。
$id = $_GET['id'];
$key = $_GET['key'];
echo $key; // I get the value
if (isset($_POST['password'])) {
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。