php

jQuery, PHP deleting of directory does not work

Hello, I am trying to delete directories using jquery, it does delete and stays on the 1a.php, which executes the code for the delete. What I exactly want is a delete of directory without page refresh, and display a message the directory has been deleted. Please let me know what I am doing wrong here. Thanks in advance Dave Please f...

cURL 'malformed url'

This url 'http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID=39726387' works perfectly well in a browser but cURL return's error 3 (malformed url). Any ideas on a work around? EDIT: cURL code: function get_web_page( $url ) { $options = array( CURLOPT_RETURNTRANSFER => true, // return web p...

What's wrong with this query?

Someone help me: $query = "INSERT INTO tbl_users(user, password, password_def, userid, level , regdate, lastdate, email) VALUES('$username', sha1('$password') , sha1('$password'), '$userid', '0', NOW(), NOW(), '$email');"; $userid is a ramdon md5 id. It gives me this error: posttokenError: Account not created ...

PHP JQGrid Zend Framework

I am trying to JQGrid in Zend Framework , but not working. I am getting the Json formated string as output Controller: <?php // require_once 'Zend/Controller/Action.php'; class TestController extends BaseController { public function indexAction() { // TODO Auto-generated TestController::indexAction() default action ...

how to enable 2 module in joomla php

Hello, I have created 2 module for joomla. When I enable any one its working fine with joomla in left and right. But when I enable both the website is not working...its not display any website content. Please help me how I can enable more then 2 module. Thanks, Manoj Singhal ...

Uploading large video via Youtube API causing Out of Memory

I'm using PHP to send videos via Direct Upload to Youtube. It works fine for smaller sized videos but when trying to send a 390 MB video, I get the following error: PHP Fatal error: Out of memory (allocated 3932160) (tried to allocate 390201902 bytes) I've tried increasing memory_limit but that does not help. if ($isFile)...

better xml in php

is there a way to output xml in php without user know that xml render using php ? ...

xajax alternative?

I really love the simplicity of xajax calls from PHP, however xajax project seems dead by now... Is there any nice alternative or equivalent to xajax which is actively in development? ...

Urls for results of Ajax requests

Hi guys I've developed a google maps application witha neat search feature - however I've noticed that I would like to have something like what the facebook guys have done as in having a hardlink to a page that is generated by an ajax query. Example you click on a link in facebook and it appends to the current url and you can copy paste...

Convert XML to CSV in PHP

Is there a way to convert an XML file to a CSV using PHP? ...

Is there a way to reference a variable from an external document with PHP?

Hi! I wanted to use PHP do do a little thing, but I needed to know how to get a variable from an external document (say external.php) and use it in a function in a PHP document (internal.php). I was thinking maybe something like this: Code for external.php $variable = "true"; Code for internal.php if ($GETFROM{'/external.php'}['var...

convert.php does not run in a screen session

I am trying to convert a big forum. At the moment I have to do this via ssh and start convert.php with "php5 -f convert.php -- $OPTIONS". But my internet connection is a bit buggy and so it is often killed. If i start the above working command in a screen session it does not work. Instead php gives me the HTML code of the "convert.php"...

How do I use PHP to display one html page or another?

Hi! I wanted to use PHP and the if statement, and I wanted to do if ($variable){ display html page1 } else { display html page2 } How do I do this? An please note, that I do not want to redirect the user to a different page. --EDIT-- I would have no problem doing that with one of them, but the other file, it would be too much of a h...

implode warning

Hello all, I am moving to another server and now I am getting an implode warning "Invalid arguments passed", the script was working on the old server, does someone know what I am doing wrong??? My code is: $query ="SELECT keywords,keywords1,keywords2,keywords3 FROM Table "; $result = mysql_query($query); while ($row = mysql_fetch_a...

How do I insert an HTML page using PHP?

Hi! I wanted to know, is there any way to insert an HTML page into PHP without using the include function? I do not want to use an external html file, I want to write the html coding directly into the php coding. Thanks for your help! ...

URL rewriting in PHP without htaccess

website is running on a web hosting where we don't have access on htaccess file. i want to do URL rewriting for user friendly URL. e.g. Original URL www.domain-name.com/file?q=name expected URL www.domain-name.com/file/name ...

PHP, how to pass func-get-args values to another function as list of arguments?

Hello, I want to create a function (my_function()) getting unlimited number of arguments and passing it into another function (call_another_function()). function my_function() { another_function($arg1, $arg2, $arg3 ... $argN); } So, want to call my_function(1,2,3,4,5) and get calling another_function(1,2,3,4,5) I know tha...

php/regex: How to replace part of a found pattern, but leaving the rest as it is?

Hi! How can I replace a substring in a found pattern, but leaving the rest as it is? (EDIT: The real case is of course more complicated than the example below, I have to match occurances within xml tags. That's why I have to use regex!) Let's say I want to change occurances of the letter "X" within a word to the letter "Z". I want ...

some doubts like..user.id and username(primary key function),how to allow doc file for databaee,file_exist problem

I have ten fields in my table in database..And two columns out of them are of User_Id (auto_increment I need it for uploading pics.) Username (I want it as primary key so that no other user can get the same username) I am not able to do both these things together. If I make user_id auto_increment then I am not able to assign primary...

How to define certain posts as featured posts in WordPress?

I need to make a four posts featured content slider but not with the latest 4 posts. Instead I wanna define certain posts as featured, now I know I can make a new category as Featured and add it as a multiple category to the posts I wanna define as featured and something similar could also be done using a tag as well. But I was thinking...