php

mysql_fetch_array(): supplied argument is not a valid MySQL

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/davzyco1/public_html/notes/functions.php on line 43 is the error I get when I use the below class, even though the class works PERFECTLY with my old webhost. Here's my new hosts php info: http://davzy.com/notes/php.php class mysqlDb { pub...

consolidating class members in PHP

I recently came across an article by Matthew Weier O'Phinney (ZF project lead) that contains sample code similar to this: class User { protected $_data = array( 'username' => null, 'email' => null, 'fullname' => '', 'role' => 'guest', ); /* ... */ } Notice how what would traditionall...

Looking for a Distributed Server System to speed up my php "call home" script

I'm not exactly sure what I'm looking for but basically I have a PHP app that customers use on their own server. In it it does a 'call home' command to check if the license key they are using is valid before allowing them to use it. I currently make it connect to my primary server which is very fast, but it is hosted in the US and if...

twitter msg automatically post to facebook

Hi , Am not sure there is a feature like , automatically update twitter tweet in to facebook , May i know is there any like automatic update , For Should i use API or CURL , or anything else , Thanks just i find one thread from google link text Is there any thing else then this thread... ...

PHP timer without script pause/delay

So I just want to write this quick and dirty module to a program that takes the current time, echos a string, and then waits x minutes and echos another string. The only thing is, is this little module stops the rest of the program until it's finished. Any way around this? ...

Prevent repeated row from returning in mysql

I have three tables in restaurant search done in php. The search has option to filter it by multiple type by checkbox state. Some restaurant may come under multiple type and will have multiple entry in type_stack table. Table1 - **restaurant** ------+----------+---------- id + name + place ------+----------+---------- 1 ...

Subtracting dates in PHP

I have timestamps stored in the format YYYY-MM-DD HH:MM:SS (for example 2010-06-21 20:12:56). What would the best way to check how old the timestamp is? For the moment I am mainly interested in the number of days old. ...

PHP Dynamic Folders

Using PHP, how can you make a dynamic folder system, like http://website.com/user/UsernameHere/ show something like http://website.com/user.php?name=UsernameHere Does this require server configuration, or is it possible with PHP? ...

Are Codeigniter Active Records automatically escaped?

http://codeigniter.com/user_guide/database/active_record.html Is everything automatically escaped for you? ...

array sorting, but keeping other in sync

I have an array, like below. The fact is that $array[0][0] and $array[1][0] are connected. And should stay together. But I would like to order on the $array[1] values. $array[0][0] = '567'; $array[0][1] = '3971'; $array[0][2] = '19'; $array[0][3] = '1'; $array[1][0] = '10'; $array[1][1] = '50'; $array[1][2] = '80'; $array[1][3] = '...

Will this PHP isUnique function work?

It has been a while since I have programmed PHP so I am very rusty, so I just want to double check my work. With the following code work as a way to check if the string is unique against a database? function isUnique($string, $type) { switch ($type) { case 'username': $query = $this->db->selec...

how to make table with jquery?

hai.all..can you tell me how to make table in jquery? i want using this plugin for showing all data which have been input from database.. i use SELECT * FROM inspection_report for showing data table inside process.php file... how to combine with it?? ...

How to integrate AWEBER autoresponders concept in my own site

Hi all I am developing a site with a functionality of sending newsletters. I hereby like to integrate aweber autoresponders. I am newbie to this aweber concepts. Kindly advice me to do this integration. thanks in advance ...

Doing a URL Re-Write

Hello, When I click on a comment section for a given entry on a site I have, the URL looks like this: http://www...com/.../comments/index.php?submission=Portugal%20Crushes%20North%20Korea&submissionid=62&url=nytimes.com/2010/06/22/sports/soccer/22portugalgame.html?hpw&countcomments=3&submittor=johnjohn12&submissiond...

How to stream video in php

I have to stream videos in my php site? how to do that. any body knows any free flash player given sites link. Please help me. ...

Session problem in Localhost (wamp2)

I am using wamp 2 for accessing one of my project on localhost, initially i had a problem of maintaining the session in my localhost which i resolved by enabling session.auto_start and providing the domain name with period (.) in it as "127.0.0.1", But now the problem is whenever I switch to another page I do not get anything on the pag...

how to get the attribute group in magento

Hi, I need to get the attribute group of a certain attribute set , how can i do this ? i think i got the attribute group id but i can't seem to get the attributes of that group. $attributes = $_product->getAttributes(); foreach($attributes as $attribute) { $group_id = $attribute->getData('attribute_set_info/' . $_pro...

How to get url in symfony using url_for() helper , for the route with a path parameter like ...../:param

hi, I couldn't get it to work on symfony 1.4.5 I have a route : edit_page: url: /editpages/:page param: { module: pages, action: edit } and I want to get to url with a url_for() helper. <a class="float-right rounded-btn" href="<?php echo url_for('@edit_page'); ?>">Configure</a> this one just is giving me and : The "/edit...

face book graph api

i wnat know how to authentication done in server side for face book in "graph api"(oauth athentication) ...

Pre-built login / authentication component for a php app?

I know this question has been asked before, but I haven't found any answers that seem ideal. I have a php app that needs a login system. I'm no crypto expert by any means, and I am wary of reinventing the wheel, which has doubtless been invented many times already, and very well. I'm wondering if anyone is aware of a good authenticati...