php

How to detect the use of smarty template framework?

Besides the existence of Smarty.class.php (which is also arguable), how do we know that a php project is using smarty template framework just by looking at its file structure? ...

I am not able to update form data to MySQL using PHP and jQuery

What happens is that I'm able to add and delete records from form using jQuery and PHP scripts to MYSQL database, but I am not able to update data which was retrieved from the database. The file structure is as follows: index.php is a file with jQuery functions where it displays form for adding new data to MYSQL using save.php file and...

Joomla adding category description in product section

Hai I have a joomla web site. I have implemented the Djcatalog. But there is no way to enter the category description. I want to enter the category description and will display only at the category page not in the product details page. Is it possible? Or is there is any way to do this? ...

Domain-driven design with Zend

This question is a continuation of my previous question here http://stackoverflow.com/questions/2122850/zend-models-architecture (big thanks to Bill Karwin). I've made some reading including this article http://weierophinney.net/matthew/archives/202-Model-Infrastructure.html and this question http://stackoverflow.com/questions/37...

php curl upload speed

hey i made a script that uploads files to different servers using php curl and the problem is that it eats all my upload bandwith and my apache does not respond as i would like. the call is made from the php-cli and can not use any apache bandwith limiting bandwith thanks in advance ...

Do you use __autoload() ? Will it be compatible to all host ?

I'm hesitating whether or not to use this mechanism. PHP Doc says autoloading is not available if using PHP in CLI interactive mode. So, should we avoid to use this method for just in case, your application get installed in a host happenly running PHP in CLI ? ...

How to retrieve the value from Select html element using JS prototype in php?

<script type="text/javascript" src="prototype.js"></script> <script> function reload(form){ var val = $("seltab");alert(val); }</script> echo "<form method = post name = f1 action = '' >"; echo "<select id = seltab onchange = 'reload(this.form)'>"; $querysel = "SELECT title_id,author FROM authors NATURAL JOIN...

default webmail url workaround

Hi, Is there a way or at least a workaround on masking default webmail urls or disabling access webmail urls so users will not be able to change their passwords? Website is PHP based and is using apache server under a shared hosting account. The thing is that http://domain.com/webmail will let users access the main panel where they can...

PHP - Problem using file_get_contents

I have a problem while using the file_get_contents function. I am using it to get a response from a different web server, but it's not returning anything (shown as empty string using var_dump). Also, the problem is only while calling this specific server, because I got result when I used Google's address; and it's working fine in my loca...

Do PHP 4.4.9 based applications run on PHP 5.2.0 flawlessly?

I need to change upgrade the PHP version to at least 5.2.0 for my new magento OS Commerce installation, but would it mess up my current store which runs on 4.4.9 (PHPCart)? The real question is, can I upgrade without harming the old cart? ...

Adding filter parameter to stream filter when using php://filter

I have a binary that I want to convert to standard MIME-compliant base64 string. I thought I could use the php://filter method to filter the stream, but I'm getting hung up on how to set the "line-length" parameter. There are other methods that would achieve similar results, but I'm trying to figure out if: If it's even possible/allowe...

How to calculate totals with smarty php

Hi, I have a list of "before discount" prices on my checkout, I want to calculate the total amount of these in a new div at the bottom.. Any ideas? What I want to calculate: {if $item.Product.formattedListPrice} <div id="salg" title="Rabatt"></div> {/if} <div id="cart2Salg"> {if $item.Product.formattedListPrice} <span class="listP...

Is this a valid url parameter in jquery.ajax()?

Is this a valid url parameter in jquery.ajax(), <script type="text/javascript"> $(document).ready(function() { getRecordspage(); }); function getRecordspage() { $.ajax({ type: "POST", url: "http://localhost/codeigniter_cup_myth/index.php/adminController/mainAccount", data: "", contentType:...

I have the URL www.something.com/HereWeGo, I want to get HereWeGo without the 404 error

Hello, Consider the URL www.something.com/HereWeGo. When someone enters the url, the site shows a 404 error since the directory does not exists. I can parse the URL to get the query and HereWeGo, but cannot stop it from going to a 404 error. How can I achieve it by PHP, if it is possible to avoid .htaccess now Thanks Jean ...

PHP: How to store XML data in an array?

Below is the XML I am working with - there are more items - this is the first set. How can I get these elements in to an array? I have been trying with PHP's SimpleXML etc. but I just cant do it. <response xmlns:lf="http://api.lemonfree.com/ns/1.0"&gt; <lf:request_type>listing</lf:request_type> <lf:response_code>0</lf:response_cod...

Can I create a database using PDO in PHP

I am create a class which uses PDO to interact with MySQL. Can I create a new MySQL table using PDO? ...

Website. AJAX and FIREFOX problems. I dont think Firefox likes ajax..?

Working on an AJAX website (HTML,CSS,JavaScript, AJAX, PHP, MySQL). I have multiple javascript functions which take rows from mysql, wrap them in html tags, and embed them in the HTML (the usual usage of AJAX). THE PROBLEM: Everything is working perfect, except when I run the site with Firefox (for once its not InternetExplorer causin...

Detecting end of method chain in PHP?

Hello! I cannot find a simple example about my question above: how can i detect the end of a method chain? I'm just looked Zend_Db_Select for example but this one is too complex for this simple question i think. Is it possible to catch the 'end' of a method chain in PHP? thanks, fabrik ...

paypal integration

Hi, I am integrating paypal in my website But i have some issues in it , http://www.rmmitchellconsulting.com/ - click on the paypal button here you will see one box, I need two boxes. to put amount and invoice number. How can i do this. does any one did this. Please help me to do this. ...

How to auto apply drag and drop effect to dynamically added element ?

I use jquery ui to apply a drag and drop effect on a serial of DIVs, for example: <div class="draggable">...</div> <div class="draggable">...</div> <div class="draggable">...</div> <div class="draggable"> this DIV was dynamically added, not draggable </div> The problem is dynamically added DIVs won't have this effect applied, how can ...