php

css of pagination links

i'd like a basic idea of how to go about formatting the following paging of the search result. this is the paging code: //Create and print the Navigation bar $nav=""; $next = $page+1; $prev = $page-1; if($page > 1) { $nav .= "<div class=\"search_mainpg\"><div class=\"searchpage\" style=\"width...

Best way to handle JSON timeout

Currently I am pulling a JSON feeds from numerous APIs using jQuery, but what is the best way to handle the possibility of a service not responding or timing out because of their server? Would it be better to cache the JSON on your server? I'm using PHP/MySQL so I'd like to see an example if a server-side solution is the way to go. ...

component based vs full stack framework?

i dont understand what these 2 words mean. i think symfony is a full-stack framework while yii is a component-based framework. is this correct? if so, what are the main differences? thanks ...

"Better" way to write this?

Is there a better (ie, more readable) way to write this? if (isset($input_vars['directive']) && $input_vars['directive'] == 'edit') { ...

Howto use FB Graph to post a message on a feed (wall)

I have created an app, and now i want to post a message on one of my friends wall with use of the new Graph API. Is this do-able? I am already using oAuth and the Graph-api to get a list of all my friends. The API at http://developers.facebook.com/docs/api tells me to cURL https://graph.facebook.com/[userid]/feed to read the feed, but i...

php str_replace pattern

Hello , I have a php application that saves the pictures on the server and also stores the picture names in the database . The issue that I have is that the picture names include the path/folder where it was saved from (e.g 1220368812/chpk2198933_large-2.jpg) so I need a str_replace pattern to remove "1220368812/" and have the picture ...

How to parse a "Mysql result JSON String" in Javascript?

Is there a way to convert it into object form? So that each field of the result can be accessed results[i].field where i is the number of records in the mysql result.. This is my JSON String http://pastebin.com/Cky1va3K ...

How do I assign a rotating category to database entries in the order the records come in?

I have a table which gets entries from a website, and as those entries go into the database, they need to be assigned the next category on a list of categories that may be changed at any time. Because of this reason I can't do something simple like for mapping the first category of 5 to IDs 1, 6, 11, 16. I've considered reading in the ...

PHP foreach loop through multidimensional array

I have an multidimensional array, how can I use it? I want to use each separate array in a for loop. What I want to achive is to be able to put each part in my database like entry in db no. 0 -> 1 and 4 entry in db no. 1 -> 5 and 6 entry in db no. 2 -> 1 and 4 and 5 and 6 I have this code: <?php print_r($calculatie_id); for ...

php5 SOAP client developing identical tags

I am trying to generate a SOAP XML request that looks something like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dto="dto" xmlns:com=""> <soapenv:Header> <dto:AuthenticationDTO> <dto:LOGIN_ID>login</dto:LOGIN_ID> <dto:LOGIN_PASSWORD>login</dto:LOGIN_PASSWORD> </dto:Authent...

Which software is best for browser compatibility testing?

Which software is recommended? I know of Adobe Browser Lab only, and it seems pretty new... Is there any better SW out there? Thanks PS: I have a classifieds website (PHP, MySql, Solr, js) developed on local computer using virtual server etc... Now I need to test it on different browsers. It is developed only with Firefox, so it works...

How to create wordpress-like option table and get values for each row?

Hi guys. I'm looking to create an options table in my db that makes every record a system option, so I can work with a little number of fields. My db has the following structure: 3 columns named id, name, and value The following data is inserted as an example: +--+-----------+--------------------------+ |id|name |value ...

What is faster: write PHP code using "functions" or writing it as pure script?

What is faster: writing PHP code using functions or writing it as pure script? So, as I see it Apache or any other server will create from PHP code using functions a pure script... I mean we had: function foo($a, $b){ return ($a + $b); } echo foo(4, 5); and PHP will turn it into something like: echo 9; Or will it? ...

can't access wordpress normally anymore; after login weird page opens

Hi there, I have no idea what's wrong, but I just tried to log into wordpress on my server, but right after I login I get the following page: Index of /cc-common/wp-admin Parent Directory admin-ajax.php admin-footer.php admin-functions.php admin-header.php admin-post.php admin.php async-upload.php categories.php comme...

Php_value memory_limit? what happens if increased?

Hi guys i have this in my htaccess file, i was wondering what is it for ? what happens if i increase it to say 128mb or 16mb what difference would it make ...

problem in displays data in one page

hi ,,,,, I have a problem in the following code ... The following code works as follows displays the invites for each member so that if he had five invite from supposed to be displayed all on one page But before you code that does not function Proper image is the only display one invite on the page and until the approval or rejecti...

Anyone know the best PHP source code formatter for Netbeans?

I know it has a source formatter however it is not good enough for my needs. Are there any plug ins any one knows about? Thank You ...

Get username from URL in PHP

Hi, i want something like this: http://www.someniceandreliableurl.com/username and catch the username. I want to make something like twitters/facebook/etc quick urls... twitter.com/username How can i make something like this with php? =) thank you in advance. ...

How can I get the current action in Zend Framework?

I have a plugin in my Zend Framework application that checks login status after every request, and reroutes the user to the login action if their session is invalid or expired. I would like to cache the previous request action so that, after a successful login attempt, I can redirect them back to their previous request. I have found th...

Paypal IPN Confirmation Screen immediately after redirect without reload

Hi I made a script for IPN which works great but how can i immediately notify the user? I mean paypal redirects the customer to a custom-page i can define, simultanously my ipn.php checked the status, BUT how can i immediately tell the customer on this custom-page that it was successful or not. this custom-page does somehow has to k...