I am setting up a paid subscription service and want to keep the signup form to one page. I use PayPal as my payment processor and the standard way of dealing with paypal is to create "Buttons" that POST to PayPal.
However, I need to process the form data before I send the user to paypal. Once I have processed the data, how would I redi...
Does anyone know if it's possible to access a widget instance settings from a different function than widget(), update() or form() ?
For example, in the widget below I want to get the $args and $instance variables from within my_custom_function().
class test extends WP_Widget{
...
function test(){
...
}
function my_custom_...
{"required_items":[
{
"filename":"abcd",
"no":"3"
},
{
"filename":"abc",
"no":"2"
}
]}
I am not getting the code of the JSON format in PHP - I want to insert the f...
I've run into a problem with WordPress 3.0
I preface my image files with an underscore character (_somefile.jpg) to allow me to flag them for specific uses vs images that don't have the underscore.
However, I've just found that the media uploader in WP 3.0 strips these underscores from the file name. At first I thought it was just rena...
When i'm trying to display the image from the database the image is not been displayed didn't know what was the problem,here is my code.
show_desc.php
<?php
$errmsg = "";
if (! @mysql_connect("localhost","root","")) {
$errmsg = "Cannot connect to database";
}
@mysql_select_db("dbname");
if (isset($_GET['img_name'])) {...
Hello all,
I am making use of Codeigniter and I currently have this URL format setup:
http://example.com/view/
I would like to put in the logged in users username in the URL and remove the view part of the URL. The view is my controller. So I can have something that looks like this in the address bar:
http://example.com/johnny
How...
Hi there.
I have an array of permissions:
array(
array( "controller" => "somewhere", "action" => "", "namespace" => "admin", "method" => "GET" ),
array( "controller" => "somewhere", "action" => "index", "namespace" => "admin", "method" => "" ),
array( "controller" => "somewhere", "action" => "index", "namespace" => "admin"...
I have an array like this:
$categories_array = array(
[0] => 'category_1',
[1] => 'category_2',
[2] => 'category_3',
[3] => 'category_4'
)
I'd like to "filter" the array to get a new one. For example, I'd like to have a new array with only 'category_2' and 'category_3' like this:
$new_categories_array = array(
[1] => 'category_2',
[2...
What are the disadvantages of using a PHP database class as singleton?
...
Is there a way for me to lossless compress text with the following characters(88 in total)?
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789!@#$%&*()-_+=;:'"<,>.?/[]{}
I am making a chat but I don't want it to be wasting so much bandwidth(an old chat I used a few hours wasted 800mb).
The text would be compressed in java...
I get the following error message when I try this query:
$query .= "($tid, {$_POST['type']['$i']}, 'Y', NOW())";
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near
(18, , 'Y', NOW())' at line 1
Everything in my code works except this line. I know ...
I'm filtering some content on my website via country specific code, I'm trying to add else statements so it doesn't have to run each piece as individual code except whatever I try gives an error:
<?php if (function_exists('isCountryInFilter')) { ?>
<?php if(isCountryInFilter(array("us", "ca"))) { ?>
<a rel="nofollow" class='preloading g...
Hi guys I created an install wizard but its quite basic and only runs mysqli.
How do you think I could best expand this? (non-mysql), what other features are required? I plan to use it for any of my clients who wish for me to create them an app but not give away any server details.
Ok so the file structure looks a little like this
con...
I have an HTML document, which loads content from a PHP file using an AJAX call. The important bit of my code is below:
default.html :
/*more code above*/
var PHP_URL = "content.php";
var Content = document.getElementById('Content');
ajaxRequest = new XMLHttpRequest();
ajaxRequest.onreadystatechange =
function() {
if(ajaxRe...
I was wondering how would I allow a member to accept or deny another member as a friend? How would my PHP & MySQL code look like?
Here is my PHP & MySQL code.
if (isset($_GET['fid'])){
$friend_id = mysqli_real_escape_string($mysqli, htmlentities(strip_tags($_GET['fid'])));
if(isset($site_id)){
$dbc = mysqli_query($mysq...
Hello Geeks
I have seen many php scripts in which you can cascade class method to produce a specific functionality for example as in codeigniter when you load a view you would type
<?php
class Posts extends Controller
{
function index() {
$this->load->view("BlaBla");
}
}
?>
I am not completely sure ...
Hi,
Does anyone a black theme addon for dreamweaver something like this:
Thanks
...
I'm developing a feature on a forum site that will allow to include a link and other type of content on a post (for clarifying the question or answer).
Related to the link feature implementation, I have several things to work on:
Validate the URI entered (well formed, valid scheme, etc.)
Validate that the remote resource exists
Extrac...
I've built one variable (horaires_lundi) in this file :
app/code/community/Unirgy/StoreLocator/controllers/Adminhtml/Locationcontroller.php
->setTitle($this->getRequest()->getParam('title'))
->setNotes($this->getRequest()->getParam('notes'))
->setStreetAddress($this->getRequest()->getParam('street_address'))
->setHorairesLundi($thi...
Hi everyone,
I was wondering if there's a way to use PHP (or any other server-side or even client-side [if possible] language) to obtain certain pieces of information from a different website (NOT a local file like the include 'nav.php'.
What I mean is that...Say I have a blog at www.blog.com and I have another website at www.mysite.co...