Form not posting after migration

software development

#1

Hi,

I’ve got this form:

[code]
<input type=“text” name=“username” onfocus=“if(this.value==‘USERNAME’) this.value=’’”

value=“USERNAME”/>


[/code]

that I’ve been working on locally, and it works just fine. I’ve migrated it to Dreamhost, and now it’s not posting data at all (can’t even get in to check out my other forms). As in, the var_dump on $_POST returns “Array,” and nothing else. No change in the files between work and migration.

I know it’s calling the php action, since that’s what’s returning errors in the first place, but I have no idea what’s going on here. Locally, I’m using WAMP with PHP 5.3.9 and MySQL 5.5.20. Thanks in advance.


#2

Form is fine. I’d check the code in do_login. print_r of $_POST shows the following on my DH test site:

Jw


#3

You’re right. The form was fine. The problem was the (probably misbegotten) use of mysql_real_escape_string to sanitize the data. So, look out for that if you have this same issue. Tx.


#4
$query = sprintf("SELECT * FROM table WHERE var1='%s' AND var2='%s'",
            mysql_real_escape_string($var1),
            mysql_real_escape_string($va2));