![]() |
![]() |
![]() |
||||
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
Industry Role:
Join Date: Jun 2004
Location: Europe
Posts: 3,055
|
Any PHP gurus in the house? Can you help with simple task?
I have this script that uploads image and does insert entries in db. The upload field is for graphics only. Im trying to restict it to these types only:
$fileType=='image/jpg' || $fileType=='image/png' || $fileType=='image/gif' How can I put in my script? Here's the little scripty I wrote.. I just need to add restrictions on upload types. PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Jun 2004
Location: Europe
Posts: 3,055
|
figured it out. had a stupid typo.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Mar 2004
Location: Rock Hill, SC
Posts: 5,370
|
just a suggestion... if this upload is public you should do more than strip_tags to make it secure and it's always a good idea to escape text before you insert it.
check http://us3.php.net/mysql_real_escape_string |
![]() |
![]() ![]() ![]() ![]() ![]() |