Monthly Archives: June 2010

Zend Framework: Inject JavaScript Code in a Action/View

There is a view helper that can inject a head or inline script into your code. Simply by putting some JavaScript code into the view script wont do the job, because the .phtml file is grabbed and parsed by the … Continue reading

Posted in javascript, micro tutorial, PHP, zend framework | Tagged , , , , , , , , , , , , | 3 Comments

Bind Zend Action with Non-Default View – Part 2

Typical Setup Typically Zend Framework is setup to bind every controller’s action to a specific view. The names of the action and the view script must be the same, or at least must be similar – following the ZF’s convention. … Continue reading

Posted in micro tutorial, PHP, zend framework | Tagged , , , , , , , , , , | 1 Comment

jQuery: Get the Selected Option Text

What’s the Task? First of all let me explain what is the task. If there’s a select menu with several options, each of which are with a given value attribute, the task is to get the text into the option … Continue reading

Posted in javascript, micro tutorial, snippets | Tagged , , , , , , , , | 5 Comments

Redirect with Zend Framework

Once I wrote about redirecting with Zend Framework, but what I missed back than was a common mistake. Although the code from my post is working, to be completely correct after redirecting I’d to add an exit() statement. This is … Continue reading

Posted in micro tutorial, PHP, zend framework | Tagged , , , , , , , | 1 Comment

Get the Server’s IP Address with PHP

If there’s a need to get the server’s IP address with PHP, the answer is simple: <?php echo $_SERVER[’SERVER_ADDR’] ?> Actually that looks pretty much like the getting the user’s IP address: <?php echo $_SERVER[’REMOTE_ADDR’] ?>

Posted in PHP | Tagged , , , , , | Leave a comment