php

Loading Vars into Flash (AS3) Happy Until HTML Tags Pop Up.

I'm working on a little blog app in flash and can't seem to load any variables with html embedded. Is there a way around this? flash code: var urlLoader:URLLoader = new URLLoader(new URLRequest(path + "index.php")); urlLoader.addEventListener(Event.COMPLETE, showData); function showData(e:Event):void { var dataObj:URLVariables = n...

How to call switch function from using PHP

I have a ajax.php file that contains the following sample code: switch($_REQUEST['request_name']) { case 'edit': echo "edit mode"; break; case 'delete': echo "delete mode"; break; default: die("Error: wrong request name ".$_REQUEST['request_name']); ...

Persistence of checkbox data from 5-page html table display

I'm a PHP learner. I am pulling rows from a db and displaying them in a very simple HTML table. Each row begins with a checkbox. There are 20 records on each page, and there are 5 pages. Every time I go to the "next page", the values in the $cVarString below are vacated. No page-to-page persistence. If I choose 10 rows on one page ...

Scraping and using data using PHP from a website that must be logged on to (Reddit)?

I would like to create a webpage that, given two reddit usernames and their passwords, subscribes user2 to all of the subreddits that user1 is subscribed to. So I need to: Get the subreddits that user1 is subscribed to. Subscribe user2 to those reddits I have experience using PHP, but I have no experience with scraping (especially wh...

Display same-day events together (PHP/MYSQL)

$sidebarEvent = '<h4 class="scheduler_sidebar_link"><a href="{*URL*}#date={*DATE_SQL*},mode=month" target="_blank">{*DATE*}</a></h4> <div class="scheduler_sidebar_text">{*TEXT*}</div>'; This is a snippet from a plugin that I'm using. It prints event date followed by description. How do I modify it so that all same-day ...

I have var_dump a variable and it is empty.

I want to know the reasons why this variable is passing empty. <form action="cart.php" method="POST"> <input style="width:10px; margin-left:9px; " name="price[]" type="checkbox" value="' . $variety['price'].'_'. $variety['variety']. '_'. $product['name'] . ' " /></form> Can you see $product['name'] how can I print the it's value afte...

Matching arrays in php

I need check whether a given array will match another array. I can't figure out how to either manipulate the first array, or to match it some other way. I need to match this array: Array ( [1] => site [2] => blog [3] => index.php ) to match this: Array ( [site] => Array ( [path] => site ...

Testing 'pluggable' function calls clashes for WordPress and unit testing

WordPress has a group of functions call pluggable functions; basically, they are designed to be overrided for new functionality, but there is a catch - if another plugin define that function first, some other plugin of a lower priority cannot...(or else there will be a fatal error). Hence it is common to have 'include guards' like this ...

Reading a Struct Within a Struct via PHP's Unpack Function.

I want to know how to read a struct within a struct via php's unpack function. When I get an IS_MCI packet, I check it's Type to make sure it's equal to ISP_MCI, and then I check NumC to find out how many CompCar structs there are within this packet. The problem is trying to unpack these contents into an array via a single function. I al...

Strategy for normalizing multiple SOAP responses

I'm basically trying to merge multiple SOAP responses because the web service only supports one room lookup at a time instead of multiple as far as I know - its the CheckAvailability method and using this WSDL If I supply my credentials, arrival/departure dates in my SOAP request I get the following data back, which is mainly comprom...

matching text with data in database?

i am new to php, html and js.I am trying to make a website using php, html and js and what i want to is search. actually i have a database which is storing name of videos and their URL and i want to match entered text with name of video in db. for example if someone enters arith in search text box all names having arith word in them shou...

Searching for a good PHP based Web Counter

hi, I am running a php based web application and within that application I am using bbclone to count visitors and site activity. Unfortunately it doesn't work that nice as expected because bbclone counts a lot of robots and therefor my statistic is not that accurate as it should be. So do you know any good php based web application cou...

Print database data in html Table

I know how to print data from database on html table but i have one task that i can not understand, and i can not do it. I have a table in database and when i select those data i want them to display on html table but something like this: ...

how to add ftp users to an apache from PHP?

how do i go about adding ftp users to an apache web server? i need the user to register from normal web/script and then have an FTP account set up for them automatically. I have seen the cPanel API, and it is pretty decent, but since cPanel costs money, i don't wish to use it for this project. I'm also reluctant to use any other lisence...

How to determine search query forwarding user to my website?

Greetings, I'm trying to work out what query is being used to forward people to my website. I'd appreciate it if anyone could tell me what api call I should be looking into. I'm sure this is possible with javascript as well as ruby and php so any technology is fine. Just for learning sake I don't mind know what I should be using for ...

How To Aggregate API Data?

Hi, I have a system that connects to 2 popular APIs. I need to aggregate the data from each into a unified result that can then be paginated. The scope of the project means that the system could end up supporting 10's of APIs. Each API imposes a max limit of 50 results per request. What is the best way of aggregating this data so that...

Get all custom fields that belong to a certain box in Wordpress

How can I get all custom fields that belong to a certain box only. For example, I am using the "more fields" plugin which allows me to create boxes of custom fields for instance a box called "hotel features" with different custom fields as the particular features. Teh point is that when I extract meta data in the template, there is no...

How should components should add JavaScript and CSS in Symfony

Hello, My layout.php calls include_javascripts() before my componet could call sfResponse::addJavascript(). Is there a "helper" or a "best practice" to handle this? Do I have to Seperate the call sfResponse::addJavascript()? I were happy to avoid it. Here ist my actual workaround: <head> <?php $nav = get_component('nav', 'nav') /* P...

Multi-Column Integer Ordering

I don't know if I've chosen the appropriate title for this question (if not, please change it accordingly) but consider the following simplified table structure I'm working with: ---------------------------------------------- | date | i | j | k | x | y | z | ---------------------------------------------- | 100209 | 1 | ...

How to change 'Timestamp'-column language in MySql?

I have a column which is a Timestamp. It records something like: 2010-02-08 12:10:22 Then I use this in php: $postdate = date( "j F", strtotime( $row['modify_date'] ) ); And it can output something like: 8 February My Q is, how can I change the date-text so it outputs the month name in another language (swedish specifically)? Ex:...