被卡住了,需要一些帮助,这应该相对简单,但几周来一直是我的祸根,快要放弃了!问题是我正在构建的社交网络的用户注册表单我想做的就是当用户将他们的地址输入数据库时用 + 替换空格。我有一个名为activation.php 的页面,当用户激活您的电子邮件地址时,它会被调用,并且我在页面上有这个代码块......
$sql = mysql_query("UPDATE myMembers SET email_activated='1' WHERE id='$id' AND password='$hashpass'");
$sql = mysql_query("UPDATE myMembers SET firstname = REPLACE(firstname, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET lastname = REPLACE(lastname, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET housenumber = REPLACE(housenumber, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET addressone = REPLACE(addressone, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET addresstwo = REPLACE(addresstwo, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET county = REPLACE(county, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET city = REPLACE(city, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET country = REPLACE(country, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET postcode = REPLACE(postcode, ' ', '+'");
$sql = mysql_query("UPDATE myMembers SET phone = REPLACE(phone, ' ', '+'");
$sql_doublecheck = mysql_query("SELECT * FROM myMembers WHERE id='$id' AND password='$hashpass' AND email_activated='1'");
$doublecheck = mysql_num_rows($sql_doublecheck);
但当然它不是用 + 更新空间,我是在某处错过了一个技巧还是这注定要失败!当然不用说,我会提前感谢大家!问候-P