Hello all,
I am making use of Adodb and I wish to get the field names of a result set. How do I do this?
$result = &$db->Execute($query);
The above query has executed successfully, I just don't know how to get the field names from that one row and loop through it.
I am making use of an access database,
I couldn't find anything in t...
I'm testing a new template for a wordpress based site, and I'd like to test it directly on the live version instead of making copies. I thought I could create a test user (wordpress is bridged with vbulletin which handles user auth), serve the usual theme to anyone BUT that specific user, who would get the new testing one.
I don't want ...
Ok this is really difficult to explain in English, so I'll just give an example.
I am going to have strings in the following format:
key-value;key1-value;key2-...
and I need to extract the data to be an array
array('key'=>'value','key1'=>'value1', ... )
I was planning to use regexp to achieve (most of) this functionality, and wrot...
Hi,
I'm working with the Head First PHP/MySql book, and have a weird problem with one of the login scripts.
I'm making a page with two input fields, a username and a password. The Code looks like this:
<label for="username">Username:</label>
<input type="text" id="username" name="username"
value="<?php ...
I'd like to have access to $lastID when calling raw Is there a way to do this?
public static $lastID;
public function raw($sql){
if(!$result = mysql_query($sql)){
throw new Exception("Could not perform query: " .mysql_error());
}
self::$lastID = mysql_insert_id();
return($result);
}
Edit: it is a class mem...
Hi,
I'm using Prestashop as my ecommerce shopping cart and CMS solution and was having problems receiving emails sent via the contact form. I asked around and found the problem to be due to the fact that I need to assign the 'from' address as something from my domain (e.g. [email protected]) and the email entered by user to be a...
I stored data in MySQL database using AJAX and it is working. But I face a problem to retrieve data using AJAX.
My coding for storing data (its a posting comment page):
function sendMail(form_id) {
// Do a client-side check; if it passes, then move on;
// otherwise, report an error to the user
//if (!validatePage(form_id)...
Possible Duplicate:
PHP: self vs this
I'm working on some code and the previous author seems to intermingle the two.
example:
class DB {
// Some functions
}
Outside the class he references it like so:
DB::somefunction();
and also like this:
$db = new DB;
$db->somefunction();
What's the difference between the two ...
I'm using curl_multi functions to request multiple URLs and process them as they complete. As one connection completes all I really have is the cURL handle (and associated data) from curl_multi_info_read().
The URLs come from a job queue, and once processed I need to remove the job from the queue. I don't want to rely on the URL to ide...
Hello!
I have a for loop which actually displays a product name and several buttons like: Edit, Update , Cancel
For each product i am displaying , it will have its own set of Edir, Update, and Cancel button as below.
Paint Edit Update Cancel
I want to loop through the buttons so that for each category, I can perform a d...
How can i assign and simpleXMl object to another simple xml Object.
For example:
$xml = simplexml_load_string("<tests><test1>test 1 </test1><test2>test 2 </test2></tests>");
$xml1 = simplexml_load_string("<test1><name>test 1</name><cat>xyz</cat></test1>");
$xml->test1 = $xml1;
print_r($xml);
it returns me this
SimpleXMLEle...
I decrypt data using PHP with this code:
$content="1234";
$cp = mcrypt_module_open('rijndael-128', '', 'cbc', '');
$iv = mcrypt_create_iv(16, MCRYPT_RAND);
$key = pack("H*",md5('a'));
mcrypt_generic_init($cp, $key, $iv);
$encrypted = mcrypt_generic($cp, $content);
echo base64_encode($key)."\n";
echo base64_encode($iv)."\n";
echo base64_...
Hello,
I was just traversing the workflow of zend framework and cant really find where the function "findByUri()" is located, I found the class it belongs , simply dumping it, but going through the hierarchy of that class(parents , interfaces and so forth) I cant really find it.
I found where it is called from
....
call_user_func_arra...
I'm now reading this tutorial,which is pretty good because it not only tells you how but also why.
http://www.symfony-project.org/book/1_2/10-Forms
But it's based on symfony 1.0,is there such a good tutorial for the newest version of symfony?
...
I am new to mod_rewrite and have been using a generator but it doesn't work.
This is an example of what I am trying to achieve.
The original URL:
http://subdomain.domain.com/company.php?test=TES001
The rewritten URL:
http://subdomain.domain.com/company/AAA001
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule company/...
I'm using PHPUnderControl (a Cruise Control plugin for PHP) as the CI server for PHP development. I use Ant to build my project. Main used features of PHPUC are
PHPUnit test review
PHPCS review
Diagrams, PHP PMD, PHPCPD and some misc. thing.
What are the pros of Hudson vs. PHPUC? I heard it's development is faster and more widely use...
Hello,
I'm trying to install the following PHP extension: http://php.net/manual/en/book.svn.php
But when I do pecl install svn-beta I receive an error message that it can't locate the svn_client.h file.
I searched the net but couldn't find any useful reference to this error.
Thank you for your help.
Installation result:
root@myUbuntu...
I don't want an other application to read the files while this php app upload/overwrites files to the remote server
...
<form method="get" action="">
<select name="name" onchange='this.form.submit()'>
<option value="a">a</option>
<option value="b">b</option>
</select>
<select name="location" onchange='this.form.submit()'>
<option value="x">x</option>
<option value="y">y</option>
</select>
</form>
I select option 'a' a...
Let me preface this by saying I'm a beginner in a PHP environment so there may be a simple answer here. We're trying to use phpCAS to connect to our university's CAS server.
Our server has been set up to match these requirements: http://www.ja-sig.org/wiki/display/CASC/phpCAS+requirements, and we have installed phpCAS to it's own access...