Hello guys,
What I have in mind is this... We are going to have people come from a particular site during a acquisition campaign and was wondering how I could conditionalize a certain section of my site to display a thank you message instead of the sign up form as they would have had the opportunity to fill this out before coming to my ...
I'm using xdebug to profile some PHP code on Windows and using WinCacheGrind/Webgrind to analyse the output, but I'm getting some strange results. Specifically, the total cumulative time for a single method is greater than 100%! How is it possible that more time is spent executing this function's code and all the functions that it calls ...
hello,
i asked this in the mongodb user-group, but was not satisfied with the answer, so -- maybe someone at stackoverflow can enlighten me:
EDIT:
i've re-written my question, because apparently it wasn't clear, what was happening -- please try my test-code before answering. thanks!
<?php
// test: a
$data = array('x' => 1);
functio...
I have made most my site SE friendly, but one part of my site bugs me...
I have a HUGE form in one of the pages, and when submitting the form (action=php_page) URL is so long it covers half a word document in one line with all the passing variables...
This is very ugly...
Is there any way to make this long URL appear short?
Or some o...
Ok. This is getting a little frustrating. I am trying to create a custom payment module for Magento. The purpose is to use Authorize.net's CIM so that we don't have to worry so much about PCI compliance. The issue I am having is that the users need to be able to access their previous credit cards and use those for purchasing. I have...
I'm creating a new plugin which will have it's own css file. The css file resides in the root folder of the plugin.
In the plugin section of the admin interface, I have added a few text fields fields. But the CSS is not applied.
I'm adding the CSS file using this code:
// Register styling
add_action('admin_init', 'event_styles');
...
Hi,
I am trying to create dynamic excel sheet, with the help of php using XML Spreadsheet.
But when I try to open the dynamically created excel sheet I keep on getting error that says 'Unable to load worksheet, problem with worksheet settings'. When I try to look at the log file it had created it shows the below text,
XML ERROR in Wor...
Hi
I'm running a Kohana setup on my local apache server. I've created a 'htdocs' folder which houses the index.php file in the kohana directory. So that the system files are not available to visitors. Now I wan't to remove index.php from the URL everytime I visit another controller, so I've tried fooling around with the .htaccess provid...
I've run into a strange problem on a WAMP server setup (PHP version 5.3.0, Apache 2.2.11). When using sprintf to output a number, I occasionally get erroneous characters in the output string.
Example: (not trimmed from anything, this is the only code in the script)
$dt1 = new DateTime('now');
$dt2 = new DateTime('now - 10 min');
$int...
Hello,
So i have a 2 dimensional array that is used over several pages (session)
$_SESSION ["Table"][$_SESSION ["count"]] [0] = $filename;
$_SESSION ["Table"][$_SESSION ["count"]] [1] = $size;
$_SESSION ["Table"][$_SESSION ["count"]] [2] = $floor;
$_SESSION ["Table"][$_SESSION ["count"]] ...
I am setting up a dns lookup form using dns_get_record. I set it up to check the A Record and MX Records of the domain that is input. However, I would like it to also display the IP address of the displayed MX Records. Is this possible?
...
This is my Javascript:
$(document).ready(function() {
$('#like').bind('keydown', function(e) {
if(e.keyCode == 13) {
var likeMsg = $('#like').val();
if(likeMsg) {
// Send the AJAX request to like.php
$.ajax({
url: 'like.php',
succ...
This code in PHP sends a HTTP POST to a Django app using CURL lib.
I need that this code sends POST but redirect to the page in the same submit. Like a simple form does.
The PHP Code:
$c = curl_init();
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($c, CURLOPT_URL, "http://www.xxx.com");
curl_setopt($c, CURLOPT_POST, true)...
Hey,
I am having this problem transferring files using NuSOAP. I understand that you can read a file and transfer it has a string but its not working. Here is an example
Client:
require('libraries/nusoap/nusoap.php');
$url = "http://www.example.com";
$client = new nusoap_client($url);
args = array('file_name' => 'myfile.zip');
$retur...
Hello,
I am trying to integrate Facebook to one of my projects. At this time I have successfully integrated Twitter so users can update their status while they are on my website.
There is a one-time login to Twitter and then I store oauth_token, oauth_token_secret, user_id and screen_name so when they login to my site (via my own login...
what does $myClass->IdentifierIDs = String::ListIntegers($pv->IDs, ',', ',', 1); do.
i never seen string::
thanks
...
I'm sure this has been asked a million times, but what is the accepted approach to this?
I have been writing php code for a while and up until recently I only copied+pasted javascript code, but now with help from YUI I've begun to understand javascript and want to use it more in an existing web app I have. I want to get various amounts...
I have my table columns set like this:
likes(id, like_message, timestamp)
id is the primary key that is auto incrementing. This is the SQL that I use to add a row:
$sql = "INSERT INTO `likes` (like_message, timestamp)
VALUES ('$likeMsg', $timeStamp)";
Everything works, but now I need to throw back the id attribute of the ne...
Hi all, I need to able to access controller methods from a model using the Kohana V2.3 framework. At the moment I'm passing the controller object (by ref.) to the model on creation which works perfectly fine but I can't help think there is a more "cleaner" way - does anybody have any suggestions? Would Kohana V3 resolve this with its HMV...
Suppose that I have a database query which looks like below -
select name, gender, birthday from person where person_id = 1;
When this query is executed, some records from the database is returned. I want to execute this query inside a function, then make a custom object which will contain the exact attributes as the column names, wi...