php

Modify php shopping cart to support multiple drop down menus

I have a shopping cart script that I am trying to modify to support multiple product selection. As it is now, the customer can select a product from a single drop down menu. Now, I would like to add multiple dropdown menus (all populated with the same options). Here is the php that outputs the dropdown menu: if($eshopoptions['options_...

No previous output,but header redirect doesn't work in PHP

header('Location: ' . $url); I've checked that there is no previous output: ob_start(); ... var_dump(ob_get_contents()); ob_flush(); header('Location: ' . $url); outputs: string '' (length=0) Then why does the redirect fail? Though I see lots of warnings and notices in the error_log,but that doesn't affect header() as long as i...

PHP Session / Array Problem accesing

Hello, I have a form that certain data, which then gets calculated and gets displayed in a table. All the data gets saved in a 2 dimensional array. Every time i go back to the form the new data gets saved in the array. That data will be displayed in the next table row and so on. I have used print_r($_Session) and everything gets proper...

Return latitude/longitude based on entered address

I'm building a php based application for a client to enter in addresses for their customers' buildings. They'd like the ability to view the location on a map (either as individuals or grouped in a city search). What I'm trying to accomplish is a lookup once the address is entered into a form that populates the database, so after they en...

How to search within an xml data set?

Hi, I have some xml data and I am trying to keyword search data. For example, if I search "some" for the following data it returns me the <id> and <title>. <resource> <id>101</id> <title>Test Environment</title> <description><b>Some</b> description. </description> <type>classroom</type> </resource> <resource> <id>102</id> ...

How to correctly configure xdebug.file_link_format ?

I want error messages outputed by xdebug to show up as links in the browser so I can open them quickly using TextMate. I added the following line to my php.ini file, restarted apache and added a few syntax errors to one of my php scripts but the file name is not showing up as a link. Xdebug is otherwise working fine on my system. xdebu...

pass value from embedded function into conditional of page the embedded function is included on

I have a page that includes/embeds a file that contains a number of functions. One of the functions has a variable I want to pass back onto the page that the file is embedded on. <?php include('functions.php'); userInGroup(); if($user_in_group) { print 'user is in group'; } else { print 'user is not in group'; } ?> function withi...

Build a Sitemap but webpages don't use links

Folks I am trying to build a sitemap (we need one badly) for a huge multi-page web app. Technically its not much more than a collection of php/MySQL web forms that use javascript instead of traditional linkage to access the many pages. <td width="100" align="center" ONMOUSEOVER="this.className='bgover'" ONMOUSEOUT="this.className='bgou...

PHP ssh2_exec answering to prompt questions

I must use ssh2_exec to install some packages on linux servers. Some of the packages require some answers when installing so I must be able to provide those answers using the ssh2_exec function from PHP. I already know the answers to those questions but it's hard to enter the response when the question is prompted. Example: // Bu...

Why can't you call abstract functions from abstract classes in PHP?

I've set up an abstract parent class, and a concrete class which extends it. Why can the parent class not call the abstract function? //foo.php <?php abstract class AbstractFoo{ abstract public static function foo(); public static function getFoo(){ return self::foo();//line 5 } } class C...

PHP Session Array Value keeps showing as "Array"

Hello, When sending data from a form to a second page, the value of the session is always with the name "Array" insteed of the expected number. The data should get displayed in a table, but insteed of example 1, 2, 3 , 4 i get : Array, Array, Array. (A 2-Dimensional Table is used) Is the following code below a proper way to "call" upo...

Drop down dynamic

I have seen it but dont know how to achieve it. The idea is that I have a drop down menu and when something is selected, something else will appear. Is it AJAX? Any ideas? ...

Relative Position in PHP between 2 points (Lat/Long)

I have a database of airports with Latitude and Longitude for each point. I want to run a PHP script to find all airports that are nearby a given airport, with their distance and relative direction. I.e. for Airport KLDJ (40-37-02.810N 074-14-40.539W) Airport Nearby KJFK - John F Kennedy Airport (21.2 nm NE) (40-38-23.104N 073-46...

Formulas in PHP

To a person skilled in programming, I know this question might seem ridiculous, but please bear with me. I'm involved in a court case and a critical point hinges on the answer to a couple of questions. Given a mathematical formula, along with complete formula documentation as shown here: (Pixelated some of the descriptors) In solvin...

What encoding does Flash Builder use to send non-English data to servers?

In my site I use Unicode... I hoped when I'll connect Flash Builder to my server (using Data -> connect to HTTP ) It will work with my API sending Russian text as UTF-8 but instead it sends Þûõó ïúушúøý to my API and so to DB and so on instead of my favourite UTF-8 &#1056;&#1091;&#1089;&#1089;&#1082;&#1086;&#10...

CURL on PHP 5.2 works in CLI but not in IIS

I have a Windows 2003 Server running IIS with php 5.2.8, I'm trying to use CURL, and it works in CLI mode (if i execute php.exe) but it does not seem to be registered when running under IIS. The output of PHP info in both CLI and IIS show the same 'Loaded Configuration File', but under IIS it does not give the CURL info box. c:\progra...

How to decode such strange string to UTF-8? (PHP)

So I have %u041E%u043B%u0435%u0433%20%u042F%u043A how to save it into real UTF-8 or (better for me to HTML entities)? ...

PHP: How To Call Standard Library Functions

Hi, I'm starting with PHP for dynamic web pages. I have some libaries written in ANSI C for getting/setting parameters and other proprietary stuff. I wonder, is there a simple solution to use a wrapper inside PHP to call this funtions? Is there a already existing class/library? What would be the best practice to do this on my own? I don...

PHP session doesn't work in wamp5

I'm stuck up with php sessions its not working i jus checked for basic programs in session ses.php ses1.php The above prog doesn't work. dont know prob wit prog or wamp server. I have turned ON register_globals in php.ini also i checked with session.save_path="c:/wamp/tmp" session.save_handler= files. pl suggest me to handle with ses...

What is difference between UTF-8 and HTML entities?

What is difference between UTF-8 and HTML entities? ...