-
Helping seeing what is wrong with this script
I reckon so! No worries mate!
-
Helping seeing what is wrong with this script
OK I was able to upload an image that was about 70kb without any problems. It took only a few seconds to do so. When I tried to upload an image that was about 2.2MB it took much longer than 20 seconds and failed. I would suggest taking a look at http://us.php.net/manual/en/function.set-time-limit.php in order to extend the PHP execution time limit.
-
Helping seeing what is wrong with this script
Yeah M refers to MB. Hm I guess you could be exceeding the PHP execution time.I wouldn't have thought it will be permissions if some files upload and some don't. What happens for an upload that fails? Check php_info for 'max_execution_time'. The value is measured in seconds. Does your upload take longer that what is specified?
-
Helping seeing what is wrong with this script
Yeah look for the upload_max_filesize parameter in php_info. There are a two easy ways you can change it: 1 - Alter your PHP.ini file if you have access to it. 2 - In your .htaccess file, add: php_value upload_max_filesize 100M Cheers, Aaron.
-
Helping seeing what is wrong with this script
Hey Ben, What happens when it doesn't upload? Can you try uploading a small file and a large file then let me know the outcomes? It could be that you're hitting your PHP file upload size limit. If this is the case then there are workarounds, but lets make sure first. Cheers, Aaron.
-
Variable Variables
You're looking for an array. $wk11 = array("week_one","week_two","week_three"); You would call the results with $wk11[0],$wk11[1],$wk11[2] etc. PHP Arrays
-
PHP contact form XHTML strict
You need to stick the PHP code in it's own file with a .php extension.The HTML form needs to know where this file is to send the user's data, so you need to alter the form action: <form action="NAMEOFPHPFILEHERE.php" method="post">
-
Tutorial - Creating a PHP contact form
Haha yeah I remember looking at this in the past but didn't find the blog link. Without the definitive answer of the blog there are just tons of forums with varying opinions! I meant to link it here too for future reference: http://shiflett.org/blog/2006/jan/addslashes-versus-mysql-real-escape-string Also, I had the same problem with that site. It's a real pain to actually get to any articles isn't it!! Thanks
-
Tutorial - Creating a PHP contact form
I've looked in to the differences between the two functions and have found that whilst the two are very similar, mysql_real_escape_string is superior. Addslashes is vulnerable to SQL injection when a character-encoding is used that contains a multi byte character ending in 0x5c. Mysql_real_escape_string is not vulnerable to this issue so should be used for escaping SQL queries. In my script,I believe the only field that would benefit from mysql_real_escape_string is the $IP variable as its the only one used within an SQL query.
-
Tutorial - Creating a PHP contact form
What's the reasoning behind mysql_real_escape_string() rather than addslashes? Thanks for pointing out the non-sanitised IP var! First tut oversight
-
Tutorial - Creating a PHP contact form
Hi guys, Here's a tutorial for creating a spammer-stopping PHP contact form for websites. Comments and questions welcome! Sneakybox Blog - Tutorial - Creating a secure PHP contact form for your website