php

html form not sending correct data, php pagination

I have recently used a php pagination tutorial http://www.tonymarston.net/php-mysql/pagination.html to display record information from mysql database. The problem is that the page only sends out the information sent in the latest form and am not quite sure how to fix the problem. the code for the form output is shown below $musicitems...

Does anyone know of a good framework or application to rapidly build front-ends for MySQL and PHP based web applications?

Can anyone recommend a good, visually attractive PHP framework or application to rapidly create back office / admin interfaces to MySQL based applications. I generally have to build bespoke back office UIs for every PHP web based application I write and wondered if there is an easier way of quickly building a web front-end to MySQL data...

Why does a PHP script use different amounts of memory on two servers?

I have a fairly large webapp that I run on a Media Temple server. We have recently decided to move it to the Rackspace cloud. When I run get_memory_usage, I'm using about 4mb of RAM more, per page load. So I guess I have a couple questions. Does it matter? Why does this happen? ...

Wordpress 2.9 theme options admin page with image upload

I am creating a theme options page for my wordpress 2.9 theme and I wanted to include a field where I can upload a different logo. So far I've added textareas, inputs and checkboxes, but I'm not sure how to upload an image. Does anyone Know of a tutorial that explains how to do this or can anyone offer some insight? Thanks for the help...

PHP PDO Related: Update SQL Statement not Updating the content of Database

I am trying to implement update statement using prepared statement in php script but it appears that it is not update record in the database and am not sure why and so would appreciate if you can share some insights. Code $query = "UPDATE DatTable SET DF_PARTY_ID = :party_id, DF_PARTY_CODE = :party_code, DF_CONNECT...

Use PHP to bind fields to a PDF template

I have various clients each sending me many pdf templates of application forms. My clients want me to export user information from my database and bind it to the templates. So for example, I have a pdf called "Fitness Form" and in it are empty fields (text, checkboxes) such as first name, last name, height, weight etc... I need to take...

php search results

I've seen alot of tutorials on search with php and mysql, but im having trouble with generating a link with the search result. For example say i have an item called "item1" in my db and the user searhes for item , item1 should be returned as a link so the user can click the link to get more information about that product. Does anyone hav...

get variable value

<?php class obj { var $primary_key; function obj($key = null){ if(isset($key)){ $this->primary_key = $key; } echo "primary_key: ".$this->primary_key."<br/>"; $this->obj_id = 14; echo "obj_id: ".$this->obj_id."<br/>"; $key = $this->primary_key; echo "obj_id...

Php connection_status

hi! I write a script for a alerter service. I used php connection_status function to get connection status. Because the script require a inf loop. I look some example and try other scripts but connection_status function always return 0. I think i tried all the script ways. Please help me. <?php ignore_user_abort (TRUE); $x=0; while ($...

Wordpress: wpdb->insert VERSUS wpdb->prepare(wpdb->query("INSERT...

Hello, I am wondering if wordpress' insert function also adds slashes to data. If it doesn't it would seem that the prepare query method would be better to prevent against SQL injection. I tried looking the issue up in there codex/api; however, it seems undocumented. Thanks! ...

How to get current snapshot of MySQL Database Table and FTP it to remote server using PHP.

Here is the scenario: I get an CSV file, which has data1, data2, data3, data4(Add, Update, Delete), data5 and there are like 90000 entries in the CSV file, first line gives description of column like DATE AGE NAME STATUS(ADD, UPDATE, DELETE) TIME 1 01/02 23 Phil A 23:00:00 2 02/03 32 ...

Convert percent value to decimal value in PHP

Hello, How to convert percent value to decimal value in PHP to be used in a computation? Example: 6.15% = .0615 Thanks! ...

Reputable geo-ip location Services

Who are some of the reputable and/or stable geo-ip location service providers? I'm specing out an application that needs this functionality, and whenever I google geo-ip I get a ton of hits, but it's hard to tell who the legit providers are and who the fly-by-night folks are. Ideally I'd like something that can run without a call to an...

PHP SQL Server addslashes() how does this work for blank values?

I'm running into the problem of users being able to submit data with ' " and blank values. I think addslashes() will work but just wanted to know what it does for blank values? Example: User enters data like: Company Name: ABC's User can skip fields as well: Company URL: I want to know what addslashes() will add if they leave the f...

PHP Order of operations

I wanted to know how PHP would execute this. Order of operations addslashes(strip_tags($record['value'])); Is addslashes called first or strip_tags? In other words, does it execute from the inside out or from the outside in? ...

[solved] PHP-called hyperlink stopped showing when CSS table implemented

EDIT: Solved - was not flutter's tag stripping, should work as advertised. I'm using Flutter (which creates custom fields) in Wordpress to display profile information entered as a Post. Before I implemented the CSS tables the link showed up and was clickable. Now I get nothing returned, even when I try to call the link outside the table...

Zend Framework - When to use viewscripts/partials vs view helpers

I'm creating a library of display objects for our application. They render the html of a lot of the common objects (users, conversations, messages, etc) in various views. By views I mean the object can spit back different 'zoom levels' of itself with different markup. Some display objects contain other display objects to render eg. a us...

oci_connect Blank Page in PHP

UPDATE (5/21/2010) SUCCESS! So after MUCH $head->desk()'ing, I've solved it. Remember kids, be wary of the instant client version you use, dependent on the virtualization settings! I had been installing the generic Instant Client (not aware our ESX servers sit on AMD processors, not Intel) and that worked fine internally (the CentOS i...

Count the sum of a column values in a SELECT statement

Hi, I have a table where I should count if an user has reached a number of penalities like 3, so if the user reach or surpass 3 points, he's banned: table_warnings - id - user_id - warning - warning_date id user_id warning warning_date 1 5478 1 2010-02-25 12:59:00 2 5478 1 2010-02-28 08...

PHP speed: what is faster? if (isset ($foo)) OR if ($foo==true)

Hi, just trying to optimize my code. I need to prefill a form with DB data and I need to check if the variable exist to fill the text box (I dont like the @ error hiding). The form is really long, then I need to check multiple times if the variables exist. Then what is faster: if (isset ($item)) if ($item_exists==true) or even if ...