Toon posts:

[PHP]stripslashes doet vaag...

Pagina: 1
Acties:

Verwijderd

Topicstarter
hier wat van mijn code...

$street = addslashes($street);
$postalcode = addslashes($postalcode);
$town = addslashes($town);

dit word netjes in een database gezet maar als ik het later opvraag met :

straat <input type="text" name="street" value="<? echo stripslashes($street) ?>"><br>
postcode <input type="text" name="postalcode" value="<? echo stripslashes($postalcode) ?>"><br>
plaats <input type="text" name="town" value="<? echo stripslashes($town) ?>"><br>

zijn de slashes er nog steeds :/

wat doe ik fout ???

  • Erik Jan
  • Registratie: Juni 1999
  • Niet online

Erik Jan

Langzaam en zeker

Kijk ff naar je php config (in Windows php.ini) en zet die magic_quotes onzin uit.
magic_quotes_gpc boolean
Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash.

magic_quotes_runtime boolean
If magic_quotes_runtime is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash.


magic_quotes_sybase boolean
If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash if magic_quotes_gpc or magic_quotes_runtime is enabled.
HTH

This can no longer be ignored.