Array foreach loop proplem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

tito85
Forum Contributor
Posts: 104
Joined: Sat Mar 13, 2010 11:26 am

Re: Array foreach loop proplem

Post by tito85 »

You are great! It seems that date issue is solved too!

However why if no image is uploaded the "Only .jpg images are allowed to be uploaded" is being displayed?
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Array foreach loop proplem

Post by AbraCadaver »

tito85 wrote:You are great! It seems that date issue is solved too!

However why if no image is uploaded the "Only .jpg images are allowed to be uploaded" is being displayed?

Code: Select all

if ($image) {
should be:

Code: Select all

if (!empty($image)) {
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
tito85
Forum Contributor
Posts: 104
Joined: Sat Mar 13, 2010 11:26 am

Re: Array foreach loop proplem

Post by tito85 »

I already tried that but still same problem happens
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Array foreach loop proplem

Post by AbraCadaver »

Sorry, I didn't look at the actual form:

Code: Select all

if (!empty($image['name'])) {
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
tito85
Forum Contributor
Posts: 104
Joined: Sat Mar 13, 2010 11:26 am

Re: Array foreach loop proplem

Post by tito85 »

Thank a lot for all your help and time my friend!!!

You are great!
Post Reply