2
голосов
2ответов
5361 просмотров

Magento: change advanced search layout

I want to change the advanced search layout to my needs. Instead of select boxes I want to have radio buttons with a picture and text in the description. For one button the layout is: [button][image][text]

0
голосов
4ответов
508 просмотров

Ajax, PHP, Javascript, smart solution

I am currently creating a type of "classifieds" website, and when the user enters the site he/she is able to choose for example "Vehicles" in a dropdown list, and then choose mileage, year, price range etc... Here is my problem, I have managed to make contact with a db using Ajax to call a php s...

0
голосов
4ответов
300 просмотров

PHP webpage generator will not generate?

How do I fix this so that when php calls $fontcolor and the user selects the option value = "fblue" the font color will be blue? Likewise if the user selects the value = "size1" for Font Size 1, how do I change the font based on the user selection, since this is a radio button I think only th...

3
голосов
4ответов
7380 просмотров

image upload with ajax and php

I want to use ajax to upload image. In this module: On clicking browse and selecting image, it will be uploaded and displayed over file field. After adding title and description, and clicking on the button, that image will be displayed below and upper image field will be blank

3
голосов
3ответов
22668 просмотров

HTTP headers for jpg files after mod_rewrite

I'm using Apache's mod_rewrite to route requests for JPG files to a directory outside my web root. It generally has been fine, but there are a few images that do not display. I then realized that when I use PHP's get_headers() function on my image URLs, they are all returning Content-Type: tex...

0
голосов
2ответов
102 просмотров

mysql results-to-csv writing function execution doesn't finish on production

I have this function on my controller (Im using CodeIgniter) that reads the database, then produces a comma-delimited string that I feed on print() so the user can save/open the file. On development, the export of about 2000+ records takes about 20-30 seconds. The problem is, on production, the...

0
голосов
2ответов
523 просмотров

fsockopen() [function.fsockopen] : Error through SMPP

I am using SMPP with PHP for sending and receiving messages. I got this error when i am trying to send a message. what is the cause of this and how can i send a message ? thanks. pfsockopen() [function.pfsockopen]: unable to connect to sms.korewireless.com:2777 (A connection attempt failed be...

0
голосов
2ответов
144 просмотров

php and file storage on windows servers

My question is related to using a difference drive on a windows server to store files. The partition of the server is too small to handle a large amount of data files, and I want to use the D: drive as the file storage space. My problem is, how do I access the files when they're stored on the D:...

1
голосов
1ответов
797 просмотров

PHP & MySQL & forms -- flexible search? (ex: X ingredients can make Y recipes)

I'm just getting started with PHP/MySQL, so please forgive the rather simplistic question: As a practice example, I want to create a small dbase of recipes. Each recipe has X different ingredients. The table is simple enough I think - each row represents a recipe and each column after the first(...

1
голосов
1ответов
723 просмотров

How can I calculate the width of text, in "points"?

I need to get a width of text in some universal points. This calculation should take into account different widths of letters. imagettfbbox() is not an option in my case. Any other ideas?

2
голосов
7ответов
1730 просмотров

closing browser after failing to login 3 times

after failing to login 3 times (wrong password, username), i want the browser/window/tab to be closed. how can i do this in javascript or php? and also can you give me some suggestions on what i can do to my system when user fails to login 3 times. thanks.

0
голосов
2ответов
3843 просмотров

Send SMS to a mobile port

I want to know the PHP coding for sending the messages to the mobile port.

4
голосов
3ответов
3988 просмотров

PHP XPATH of HTML document omitting all tags. I want to keep them

I am parsing a HTML document with XPATH and I want to keep all the inner html tags. The html in question is a unordered list with many list elements. <ul id="adPoint1"><li>Business</li><li>Contract</li></ul> I am parsing the document using the following PHP...

3
голосов
4ответов
11227 просмотров

Create Excel chart programmatically in PHP

Do you have any idea on how to create a chart in an Excel sheet programmatically from PHP ? I know you can invoke the Excel COM object, but the server is running on a Linux machine... I already use the excellent PHPExcel library but they do not offer the option to create charts. Thanks !

0
голосов
5ответов
425 просмотров

Is there a way to force open a new browser window from MOzilla to IE by Onclick function?

Iam getting new window pop up by using window.open(), but need When i click button in Mozilla browser, a new pop window should open in Internet Explorer, Is it possible......

0
голосов
1ответов
1884 просмотров

How to get artist name from music file by using php..?

I have a music file having artist name or author name.I want to fetch author details by using php.Is it possible?

0
голосов
3ответов
92 просмотров

Php: problem with associative arrays

If i have an array with hundreds of random ids (having values too) like (3=>23,2=>34,17=>670,5=>67...) how can i get an output like following via a loop ID: 3 has a value= 23 ID: 2 has a value= 34 ID: 17 has a value= 670 ID: 5 has a value= 67 I can reference the values by their ...

18
голосов
3ответов
50019 просмотров

PHP: Merge 2 Multidimensional Arrays

I need to merge 2 multidimensional arrays together to create a new array. The 2 arrays are created from $_POST and $_FILES and I need them to be associated with each other. Array #1 Array ( [0] => Array ( [0] => 123 [1] => "Title #1" [...

4
голосов
5ответов
270 просмотров

How can I represent a formula in a way that is understood by both Javascript and PHP?

I'm writing a shopping cart in PHP, and part of its function is to calculate shipping for a given set of products. For users with Javascript enabled, I want to provide the smoothest experience possible by having an accurate shipping calculation done on the client side so that changes in the cart ...

2
голосов
4ответов
8071 просмотров

How to acess multiple classes through one parent class in PHP

Lets say I have a class called PageBuilder which I instantiate, send parameters to and call functions from through my index file (which acts as a front controller). There are three sub classes associated with the PageBuilder class: Head, Body and Foot, that are accessed by PageBuilder which basic...

3
голосов
1ответов
3089 просмотров

Combine KML Polygons in PHP

I have a problem with the Google Maps API only allowing 1000 features per map. In a database, I keep records of areas. Each area has associated with it a heap of KML polygon information, stored as an XML string. Each area is made up of one or more polygons. Given some user input, a handful of t...

0
голосов
6ответов
563 просмотров

Php: get results sets from database via mysql

I am encountering a problem while extracting info from a database using php+mysql and thought it will be good if somebody here may suggest a way out. Problematic Code: $selectedProtocols=array(1,2); for($i = 0; $i<2; $i++) { $result = mysql_query("SELECT throughput FROM session where main...

1
голосов
1ответов
830 просмотров

Submitting form replaces constant GET information that is needed for the page

I'm learning php and I've got to say I've googled everywhere and I'm stuck :( My question is, in other words, how can I get new variables added to previous variables on the page? Imagine this being www.mysite.com/getvartest.php?orgvar=12345 but after submitting this form it'll go to www.mysit...

1
голосов
2ответов
1100 просмотров

Use PHP and MySQL DESCRIBE command to build checkbox and radio button menus dynamically

I'm making a data-entry web page in PHP that validates and parses data for entry into a MySQL database. There are more than 30 columns in the database that consist of MySQL SET or ENUM data. If you don't know much SQL, an ENUM datatype column can only hold one value from a collection of ENUM va...

16
голосов
5ответов
10931 просмотров

simplest, shortest way to count capital letters in a string with php?

I am looking for the shortest, simplest and most elegant way to count the number of capital letters in a given string.

0
голосов
2ответов
135 просмотров

Eliminating Characters using PHP PCRE

If I have a string $random, and I want to throw out everything except commas and numbers, how could I do this in PHP PCRE? I know \d will match numbers, but I don't get the rest of PCRE.

0
голосов
2ответов
214 просмотров

How can I reference elements with names like 'element-name' using SimpleXml

How can I parse an XML document like this: <feed> <item> <element-name>Element value</element-name> </item> </feed> If I try the following, it doesn't work: $xmlObject = simplexml_load_string($xmlString); foreach($xmlObject->item as $item) { ...

17
голосов
2ответов
26366 просмотров

How to reduce Netbeans' memory usage?

When using netbeans to edit a PHP project, the IDE can (over time) use 400+ MB of memory. Is there any way to turn off certain features or other tricks to reduce its memory usage?

1
голосов
3ответов
3850 просмотров

php imagejpeg mime type

I am using php's imagejpeg to save a GD image resource to a file, doing this: imagejpeg($im, '../images/' . $image_id . '.jpg'); It works fine, but according to my browser, it tries to read the file as text/plain: Resource interpreted as image but transferred with MIME type text/plain. I...

86
голосов
6ответов
34243 просмотров

Are global variables in PHP considered bad practice? If so, why?

function foo () { global $var; // rest of code } In my small PHP projects I usually go the procedural way. I generally have a variable that contains the system configuration, and when I nead to access this variable in a function, I do global $var;. Is this bad practice?