Then it's just this:
Hi. I a'm writting a simple application on php 5 and zend_framework. I need to create two dropdown lists that depends on each other. Cities and streets for example. I select a new city at my client page and want that my application post me at the other dropdown list streets related to this city in the database. Which would be the better way to do it?
simple is relative but I would write an ajax call to a php server side script that returned the street data. All of this would started by using a onchange event of the city select from the display page.
My component(query data from database of website) work well if i don't install joomfish.
After i installed Joom!Fish 2.0.4 Stable into my site for translation my component does not work(with error).
My code of component as bellow:
$query='select * from jos_content where sectionid=11 and state=1
order by catid ';
$database->setQuery( $query );
And i see these bellow warnings if i refer to my component.
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\so\components\com_products\products.php on line 131
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\so\components\com_products\products.php on line 131
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\so\components\com_products\products.php on line 137
I am using MySQL Administrator 1.2.17. And my problem is I cannot access the MySQL remotely from the web server. I have the dbHost, dbUsername, dbPassword. But when I tried accessing it through MySQL Administrator tool I got an error that says...
Could not connect to the specified instance. MySQL Error Number 2005
Unknown MySQL server host '...' (11004)
with the $from_header, although that might be optional. But that's not the problem you are seeing -- your code isn't even getting there.
Looking at your PHP code, the first thing executed is
Since you get the message you showed, obviously that is being evaluated as false, so the else part is executed showing the message.
So my question to you is: Why are you checking to see if the 'submit' POST variable is set? That's where your code is having problems -- before it ever gets to sending the email.
My suggestion is to take the if/else out and run the code to send the email. That should work if email is allowed on your server. If it works, then you can go back and check for whatever you want to check for with the if statement.