在php中连接从表单$\u Post检索到的字符串
我正在通过HTML表单发布一个字符串,代码如下:在php中连接从表单$\u Post检索到的字符串,php,string,forms,post,concatenation,Php,String,Forms,Post,Concatenation,我正在通过HTML表单发布一个字符串,代码如下: <html> <body> <form name="form" enctype="multipart/form-data" action="test.php" method="post"> <input name="message" type="text" value=""><br/><br/> <input typ
<html>
<body>
<form name="form" enctype="multipart/form-data" action="test.php" method="post">
<input name="message"
type="text" value=""><br/><br/>
<input type="submit" value="Upload"/><br/>
</form>
</body>
</html>
test.php的代码如下所示:
<?php
$string1 = '$_POST["message"]';
$og_url = "http://thepropagator.com/facebook/testapp/issue.php?name=".$string1;
echo $og_url;
?>
我遇到的问题是,发布的字符串“$string1”似乎没有显示在URL的末尾http://thepropagator.com/facebook/testapp/issue.php?name=“我正试图将其与之连接起来。谁能解释一下我做错了什么吗?我想你需要
$string1=$\u POST['message']代码>,没有引号。虽然我希望你的代码会出现http://thepropagator.com/facebook/testapp/issue.php?name=$\u POST[“message”]
url。我想你想要$string1=$\u POST[“message”]代码>,没有引号。虽然我希望你的代码会出现http://thepropagator.com/facebook/testapp/issue.php?name=$\u POST[“message”]
url