Hi, I'm trying to with Cookies and Zend Framework 1.10. This is my code:
$zendCookie = new Zend_Http_Cookie('foo', 'bar', 'localhost', time() + 60 * 60 * 24 * 30);
$client = new Zend_Http_Client();
$client->setCookie($zendCookie);
But the cookies aren't stored. I checked it with Firecookie Firefox's extension.
What's wrong?
Thank yo...
I have a loop (based on an array - which could grow but NOT too much - max 6 keys) e.g.: array('12','34','56',48'). What I would like to do is loop through the array and THEN loop again to find the "previous" array val.
For example, key[0] = 12, key[1] = 34 then key[0] = 12, key[2] = 56 then key[1] = 34 etc.
The values of the array ar...
if i have one form that include some input, textarea, select, and multiple file. such as
<form>
<input type="text" id="name" />
<textare id="address"></textarea>
file 1 : <input type="file" id="file[]" name="file[]" />
file 2 : <input type="file" id="file[]" name="file[]" />
file 3 : <input type="file" id="file[]" name="file[]" />
</for...
Hi,
This question is bit specific to joomla.
I know if with the code $menu = &JSite::getMenu() I can get the reference object of the complete menu. But how can i get a specif menu based on the name?
My Scenario :
I have footer-menu with items : home | about us | rules | privacy policy.
I need to display links to two menu items Rules ...
I am using maxminds geoip apache mod extention. It requires the php function 'apache_note'. However while suphp is active I am unable to access the function.
Ideally I would like to use suphp as I understand it offers security benefits.
Is it possible to use apache_note while also using suphp?
...
i'm try to work on e-commerance stuff. i would like to know whether there a price-comparison website that support API ?
...
I have the following situation:
jquery:
$(function(){
$('input[type="button"]').click(function(){
$('#result').load('script.php');
});
});
script.php:
<?php
echo "1";
sleep(2);
echo "2";
sleep(2);
echo "3";
?>
Currently the jquery load function will wait for the php script to finish and the...
For starters, I am completely new to PHP. That being said, here's my problem.
I've got a web page index.php that includes a header.php and footer.php. At the top of my index.php page I have:
<?php $pageID = 'home'; ?>
In the header.php file I have
<body id="<?php echo $pageID; ?>">
Yet when the page loads, the body tag simply lo...
Hello I have been searching for it from last couple of hours and have read every matching result google can give me but still can't get it to work.
I am creating a zend form select element through:
this->addElement('select','my_select', array(
'label' => 'Currency', 'value' => 'blue',
'multiOptions' => array( 'red' => 'Rouge'...
I'm developing a LMS solution with php/apache which takes SCORM files and outputs the courses for users to undertake in the format http://www.example.com/courses/course1/index.html
The LMS itself will be accessible by anyone and as the course content is static html I dont seem to have many options in regards to authentication.
I origin...
I am making a SOAP WSDL Request and get an exmpty result - no errors. The last_response is filled with:
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getResponse xmlns:ns2="http://api.sponsoredlistings.ask.com/api/v5/"><rval xmlns="http://api.sponsore...
I'm writing a simple script in which a gmail account is used to send an email to itself.
I altered the script from SwiftMailer's reference, but I'm not getting any results. What's wrong?
Edit: after further debugging I've found that the statement
$result = $mailer->send($message);
causes the code to fail (the echo below it doesn't...
I am not a professional web developer but I love web development as a hobby..
I am a student and I was asked to make a departmental event web site. I need to create HTML forms for user registration. I am aware of XSS Scripting attack and SQL Injection. But don't know how they exactly work. I am using PHP and MySQL on server side.
I am t...
I was writing a class that uses __get() and __set() to store and retrieve array elements in a master array. I had a check to make some elements ungettable, basically to re-create private properties.
I noticed that it seemed that __get intercepts all calls to class properties. This sucks for me, because I wanted to have a variable priva...
I am hitting a lot of different sites to get a list of information and I want to display this information as I get it. Right now I am using a Smarty Template and what I would like to do is:
Pseudo code:
{foreach $page}
$smarty_var = use AJAX to call a PHP function
Render out a new table row on the fly w/ the newly assigned var
...
Hi!
I ran out of ideas...
Imagine, I have fields that must be filled
<select>
<option value="1">Yes</options>
<option value="2">No</options>
<option value="3">Fine</options>
</select>
<input type="text" value="" name="name">
<input type="submit" value="go" name="go">
butI forgot to fill my name and I press submit. How to return option...
Does anyone know of a php class or library that helps deal with dates (meaning weekdays)? For example, I could use it to say "give me the timestamp for next Tuesday at 9:00" or "is this timestamp between next Tuesday and next Thursday".
I just have a part of my application that I need to make sure I'm not scheduling things at certain ti...
Hi,
I have two database tables (lets call them A and B) with many-to-many bridge table (AB). I have written Zend_Db_Table models for all three tables.
I have an A_Row object I extracted from the database using for example Zend_Db_Row::find method. Now I need get print a table of all rows, which are in relationship with this row. The pr...
I'm developing a Software as a Service offering that other developers can use to integrate into their own sites running on Wordpress (and eventually other platforms). The backend will run on a set of REST webservices using Grails.
I want to create a set of Wordpress widgets that can automatically hook in to my web services. The wordpres...
I have a SOAP Response which I want convert to a DOM Document. I am using loadxml() for that, but it returns an empty object.
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getResponse xmlns:ns2="http://api.sponsoredlistings.ask.com/api/v5/"><rval xmln...