php

any open source IDE with the possibility to go the declaration of a function, a variable..?

Hi, any open source IDE with the possibility to go the declaration of a function, a variable, a class... presing a key(s)?? Apart from Netbeans and Eclipse. Regards Javi ...

I installed Apache and added PHP to it, than installed MySql but PHPMYADMIN isn't working?

I was using XAMP for windows but there were forming a lot of problems with MySql so uninstalled it and installed Apache Web Server. I connected Apache to PHP and it worked fine. I installed MySql again and it worked fine. Now I can not get MySql to work with PHPMyAdmin. I did not test PHP to see if it worked with MySql without PHPMyAdmi...

Get simpleXMLElement with jQuery

How do I retrieve the contents of a simpleXMLElement variable from a php file with jquery? ...

spl_object_hash for PHP < 5.2 (unique ID for object instances)

I'm trying to get unique IDs for object instances in PHP 5+. The function, spl_object_hash() is available from PHP 5.2 but I'm wondering if there's a workaround for older versions. There are a couple of functions in the comments on php.net but they're not working for me. The first (simplified): function spl_object_hash($object){ i...

how do I use "server side code" to hide sensitive data from browser view?

In setting up a SSL payment page for online sales it is suggested by the merchant services company that the sensitive data (i.e., merchant credentials, ID and SSL pin, etc) be hidden with the use of Server Side Code. I have been unable to find, after hours of searching, a comprehensive definition of server side code and how it could be u...

How to flip text vertically/horizontally using php?

Does anyone know how to achieve this? ...

Database Design for Facebook-like messages

Hello, I am currently planning a new system in PHP/MySQL and want to make sure my database can handle the amount of data that I am planning to store. One of the features of my new project is a "messages" feature like Facebook. I want to make sure I create the best possible experience for the end user. The website will eventually handle 1...

Adding description tag to PHP image gallery

I am trying add a descriptive tag under each image but most of the code is in PHP and i am not to familiar with how to program it without screwing up the whole structure. Here is the website: http://suncoastdeck.com/index.php?page=portfolio&amp;start=0 Here is the code for the portfolio page: <div class="content-box"> <? //to...

[php] Youtube download'er in highest possible format (server side)

Welcome, I'm looking for youtube api what allow me to download youtube video in highest possible format. Few years ago this job was more simple because url had information about quality like "fmt=22" or "fmt=6" right now we are live in future and that information is embed in player. Now it's more complex... google use cache servers an...

PHP: Passing variables for mysql query without enclosing them in " or '

Hi, There's an open source application that does queries like so: $db->query('SELECT item FROM table WHERE something='.$something); This works fine, mysql runs the query however if I use exactly the same method I get an error, mysql is seeing it as "something = (value of $something)" and it's (rightly) complaining that (value of $som...

PHP: caching pages with state

I would like to utilize caching on a couple pages: individual blog pages index.php However, after devising my system, I realized that the headers of my pages change according to state very slightly (aka, it says something like "Hello, [email protected]" if you are signed in). I therefore want to make sure that it doesn't accidental...

PHP: upload files to network shared folder

Hi there: I have a problem uploading file to a network shared folder. I can connect to the folder by using windows authentication in IE. The script is as followed: $target_path = '\\\\server\\images\\'; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'],...

MySQL Multiple Counts in Single Query

I am trying to COUNT two columns in a single query, but the results are spitting out the same values for medcount and uploadcount. Any suggestions? $sqllog="SELECT * , COUNT($tbl_list.listname) AS listcount, COUNT($tbl_uploads.id) AS uploadcount FROM $tbl_members LEFT JOIN $tbl_list ON $tbl_member...

Link in table cell doesn't work in mozilla...

I'm returning a PHP array from a function and want to display in a tabular format with appropriate links in their respective cells.This works fine in IE7(Windows 7) but the links r not clickable in firefox 3.5.7. Here is the little of code : <td>Monday<?echo "<br>" . $date[1];?></td> <td><? if($timetable['mon']['1']!=""){ ?> <a href="...

Encrypt / Decrypt Primary Key instead of using UID?

Although I always check that someone is allowed to access a record, I normally use a UID in query strings as I feel it discourages the temptation to "poke around" that ?id=1, ?id=2 does. I find though that it makes it a bit convoluted to do lookups across multiple tables as you need to store the UID as well instead of just the record id...

Doctrine - all records are returned when there are no matches in Searchable behavior

I'm using the Searchable behavior in Doctrine to search for products in my catalog. It works great when searching for keywords that do match a product. For example, the keyword "Backpack" returns all products with the word "Backpack" in the title. However, when a search is done for a keyword that doesn't match a title at all then every...

How to add extra whitespace in PHP?

I was wondering how can I add extra whitespace in php is it something like \s please help thanks. Is there a tutorial that list these kind of things thanks. ...

PHP class function will not change an array

I am new to PHP and programming in general. I have been working on a few things with PHP that have required me to create classes, which has been fine, except that I can't seem to get my class methods to work on arrays that are properties of the class. I must be doing something pretty fundamentally wrong, because it doesn't seem to work r...

Help with a T_ELSE parse error: syntax error

switch($_GET["action"]) { case "add_item": { AddItem($_GET["ids"], $_GET["qty"]); ShowCart(); break; } case "update_item": { UpdateItem($_GET["ids"], $_GET["qty"]); ShowCart(); break; } case "remove_item": { RemoveItem($_GET["ids"], $_GET["id"]); ShowCart(); break; } default: { ShowCart(); } } function AddItem($itemId, $qty){ $result...

How to do preDispatch forwarding in Zend Framework?

I want to use _forward() in preDispatch after checking if the user is logged in in every controller. The scenario is quite easy: If the user is not logged in, it should be forwarded to loginAction either in the same controller or in another controller. This would cause an infinite loop, as the dispatch process starts over again, callin...