|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
$_POST echos wrong value
Hello;
I use this form to clean the form inputs and it works fine: PHP Code:
This part prints: Values so far:\'\'\' Which is correct. The magic quotes are off and the code does what it's supposed to do; adding slashes. Now when I write the query later like this: PHP Code:
This prints : SELECT * FROM customers WHERE emailaddress = ''''' What happened to the backslashes????????????????? |
|
#2
|
||||
|
||||
|
$_POST isn't passed as a reference to escape_string and you never assign the return value of escape_string back into $_POST (which is good practice anyway so you shouldn't change that). Your query should be using $clean_data instead of $_POST['email'].
|
|
#3
|
||||
|
||||
|
Quote:
Thanks, looks good ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > $_POST echos wrong value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|