php

getting _POST value of fb:request-form FBML - PHP

Hi there I am using this following code trying to build an app that simulates sending gift to other users, <fb:request-form action="sendgift" method="post" type="gifts" invite="false" content='Enter the name of your friends whom you will send GIFT to <fb:req-choice url="http://apps.facebook.com/appname" label="Confi...

What should I learn & use to become a pro in PHP & Python Web development?

Hello, I'll just show some code to show how I do web development in PHP. <html> <head> <title>Example #3 TDavid's Very First PHP Script ever!</title> </head> <? print(Date("m/j/y")); require_once("somefile.php"); $mysql_db = "DATABASE NAME"; $mysql_user = "YOUR MYSQL USERNAME"; $mysql_pass = "YOUR MYSQL PASSWORD"; $mysql_link = mysq...

i recieved warning when set cookie

i used mvc concept for my project... i can set cookies index page... but i can not set cookies in view page,,, i received the following warning... Warning: Cannot modify header information - headers already sent by... thanks advance ...

Phpmyadmin foreign key drop-down field help

Hey guys i'm using phpmyadmin (php & mysql) and i'm having alot of trouble linking the tables using foreign keys. I'm getting negative values for the field countyId (which is the foriegn key). However it is linking to my other table fine and it's cascading fine. So when I go to add data there will be a drop box for the CountyId and the...

Relational database question with php.

Hi, Not really a coding question more a little help with my idea of a Relational database. If I have 3 tables in a SQL database. In my php script I basically query the companies which are in industry "a" and then insert a row into a separate table with their details such as companyId , companyName etc is that a type of Relational data...

How to get first word of a sentence in PHP?

hi, i want only the first word of a variable.. example input: <?php $myvalue = 'Test me more'; ?> the output should only "Test", the first word of the input.. how can i do this? ...

HELP,PLEASE,values not updating from PHP AJAX form to MYSQL database

Hi all and thanks in advance to all for this I tired searching the entire forum and was unable to find the answer i was looking for so i decided to post a new thread, if a thread explaining this already exists than i'm sorry for not finding it and posting there. any how my problem is that i am unable to update the values enterd in the ...

Exploding a String In PHP

How do i explode this string '||25||34||73||94||116||128' i need to have a array like this array ( 0 => '25', 1 => '34', 2 => '73', 3 => '94', 4 => '116', 5 => '128' ) explode("||", $array); didnt work for me i get this array array ( 0 => '', 1 => '25', 2 => '34', 3 => '73', 4 => '94', 5 => '116', 6 => '128', ) ...

convert object to array

<?php print_r($response->response->docs); ?> display the following Array ( [0] => Object ( [_fields:private] => Array ( [id]=>9093 [name]=>zahir) Object ( [_fields:private] => Array ( [id]=>9094 [name]=>hussain)..) how to change the object to array... i want the following Array([0]=>([id]=>9093 [name]=>zahir) [1]=>([id]=>9094...

A problem about in_array

Hi all, I have got a strange problem about in_array recently which I cannot understand. e.g. $a = array('a','b','c'); $b = array(1,2,3); if (in_array(0,$a)) { echo "a bingo!\n"; } else { echo "a miss!\n"; } if (in_array(0,$b)) { echo "b bingo!\n"; } else { echo "b miss!\n"; } I ran it on my lamp,and got a bingo! b...

is it foolish to use gmail with PHPMailer?

Soon I'll be launching my new site and i was planning on using gmail as the email server for things like registration and lost password. I'll be using google apps (free version) so I can have [email protected]. Besides the 500/day limit are there any other potential problems with using gmail for this service? ...

How to integrate vBulletin auth with my site?

Hello, I need to use vBulletin auth system on the rest of my site. Does vB has any APIs for that? Im expecting to find something like that: if($vBulletin->isAuthenticated()) { // user authenticated } In case of vB does not have such API, is there any other ways to check if user is authenticated? ...

wordpress query

How do I query posts from a category using more than 1 custom key/value pair? ...

Parsing number value from SEF url in PHP

I have SEF urls like /sitename/section/12-news-title and number 12 is id of the news. I need to get that number 12 in my php code, is there any out of the box method in PHP for this? ...

Drupal - Grabbing and Looping NID of CCK Nodereference field

Hello, cant seem to work out how i grab multiple nids of a node reference field. $node->field_name[0]['nid'] picks up the node id of the cck node reference field. however when that cck node reference field has more than one value i get stuck! my php is abit sketchy atm so working with arrays and loops is being quite difficult! here ...

problem calculating the position using php

I have a function below which gets name from a site. Below is the partial code, not complete. The values are passed thru a for loop using php. function funct($$name,$page) { $url="http://testserver.com/client?list=$name&amp;page=$page"; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,url); $result=cur...

Handling large datasets with PHP/Drupal

Hi all, I have a report page that deals with ~700k records from a database table. I can display this on a webpage using paging to break up the results. However, my export to PDF/CSV functions rely on processing the entire data set at once and I'm hitting my 256MB memory limit at around 250k rows. I don't feel comfortable increasing the...

Fancybox for .flv

Is there a way to manipulate jquery Fancybox plugin to display flash video files (.flv)? I mean making it behave like Malsup's Media plugin that can handle both .swf and .flv Putting my question in context: I have a php file that works dynamically to read the videos: if($ext=="flv"){ $fileSize = filesize($file); header("Expires...

Getting batch_action functionality in Symfony 1.0

I'm currently working on a web app written in Symfony. I'm supposed to add an "export to CSV" feature in the backend/administration part of the app for some modules. In the list view, there should be an "Export" button which should provide the user with a csv file of the elements that are displayed (considering filtering criteria). I've...

PHP IF statement not taking variable into account!

I have a tabled view in a while loop, where a user can view information on books. For example, book ISBN, book name, read status... Basically, when the user sets their 'readstatus' to 'complete' I want that specific table row to become grey! The logic is very straight forward, however I can't get my IF statement to recognise this: if ...