![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Sep 2002
Location: http://www.nightstation.com
Posts: 1,375
|
![]() Form validation in PHP
When someone enters a string similar to this in my address input field: Some street 98, 1'st floor. I get an error due to the ' char. It's substituted by / and a space! This is no good... Does anyone have the valid php ereg function to disable or replace the illigal chars like ' & // $ etc etc... ? If someone enters something like this in a form that submits it to a php page, it errors on me big time. ![]()
__________________
http://www.nightstation.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Nov 2001
Location: Poland
Posts: 219
|
try addslashes();
example <? php echo "This is correct field value: ".addslashes($_POST["form_field"]); ?> Edited: there is space between '<?' and 'php' - just remove it to get it work Edited 2: whe your form method is GET then change $_POST to $_GET |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Sep 2002
Location: http://www.nightstation.com
Posts: 1,375
|
Great idea... Thanks!
__________________
http://www.nightstation.com |
![]() |
![]() ![]() ![]() ![]() ![]() |