In CodeIgniter I'm using a base CRUD My_model, but I have this small problem in my browse-controller.. My $data['posts'] gets all posts from the table called "posts". Though the author in that table is just a user_id, which is why I need to use my "getusername" function (gets the username from a ID) to grab the username from the users ta...
Hi all,
In php we can assign a method name to a variable and then use that variable to call the method. For example:
$image_create_func = 'ImageCreateFromGIF';
$newImage = $image_create_func($oldImage);
But can we do this in Flex?
In flex, I have the string public var key:String = "email"
And I also have a value object searchTerm:Sear...
Im looking for somthing that can belong to many many models and, hopfully, has all the resizing functionality built in too.
Wondering if there's any good suggestions out there, I don't want to pick the wrong one.
Or is it just worth building my own?
...
I am really close to finishing up on a project that I've been working on. I have done websites before, but never on my own and never a site that involved user generated data.
I have been reading up on things that should be considered before you go live and I have some questions.
1) Staging... (Deploying updates without affecting users)...
Imagine that HTML page is a game surface (see picture).
User can have n number of boards (blue divs) on his page. Each board can be moved, re-sized, relabeled, created new and removed.
Inside each board there are m number of figures (purple divs). Each of these user can move inside the board or to another board, re-size, change color ...
I have some data like this :
1 TC1 PASS
2 TC2 FAIL
3 TC3 INCONC
4 TC1 FAIL
5 TC21 FAIL
6 TC4 PASS
7 TC3 PASS
8 TC2 FAIL
9 TC1 TIMEOUT
10 TC21 FAIL
If I try the below code :
<?php
mysql_connect("localhost", "root", "pop") or die(mysql_error());
mysql_select_db("jpd") or die(mysql_error());
$oustandin...
The below code seems like it should work; however, the blob in the database only contains 0 after the function is run. Does the below code look accurate? If not how can I fix it?
$tmpName = $_FILES['picture']['tmp_name'];
$fp = fopen($tmpName, 'r');
$binary = fread($fp, filesize($tmpName));
fclose($fp);
$originalImage = imagecre...
Hello
i need to refresh combo box (sub category ) related to what i choose in main category combo box , for example if i choose "chicken" in main category , the value of sub category will be "grilled chicken" , " fried chicken " ? how should i do this ?
<select name="categorylist" id="categorylist">
<?
$sql_query= mysql_que...
what is the best way to detect whether a given url is actually an RSS feed?
...
So, I'm having some problems with a MySQL query (see other question), and decided to try a different approach.
I have a database table with some duplicate rows, which I actually might need for future reference, so I don't want to remove. What I'm looking for is a way to display the data without those duplicates, but without removing the...
In ZF you create a project by running this command:
zf create project MyProjectName
But how does one load a project that already exists?
I don't see anything in the documentation that specifies a zf load project or zf set project or something like that.
Thanks.
...
I can create a sparse php array (or map) using the command:
$myarray = array(10=>'hi','test20'=>'howdy');
I want to serialize/deserialize this as JSON. I can serialize it using the command:
$json = json_encode($myarray);
which results in the string {"10":"hi","test20":"howdy"}. However, when I deserialize this and cast it to an arr...
Hi, I am trying to create a social timeline. I pull in feeds form certain places so I have a timeline of thing I have done. The problem I am having is with Google reader Shared Items.
I want to get the time at which I shared the item which is contained in <entry gr:crawl-timestamp-msec="1269088723811"> Trying to get the element using $...
(tl;dr: What's the best learning path to go from PHP/Python web development to application development for Windows CE?)
I'm a self-taught programmer, and I tend to learn by starting from the goal and researching backwards until I get to a point I know. However, I now have a project involving barcode scanners on a pocket-pc, and I'm at a...
I wrote a code for login verification..I got output with GET. But i need output with POST since it is more secure.pls let me know if there is any error in my code.
javascript code:
var xml;
function verifyusernamepasswd(pass)
{
//pass is password that will be passed as parameter
xml=new XMLHttpRequest();
var url="http://localhost/login...
Hello, I was looking at the pagination script (posted below) and found it to be gros,s and not very good at all especially when trying to customize it.
This is what the main page looks like:
<?php
include('config.php');
$per_page = 9;
//Calculating no of pages
$sql = "select * from messages";
$result = mysql_query($sql);
$count = mysq...
I am trying to figure out how to validate a section of a form using php. If at least one of value 1-5 is checked, then at least one of value A-E must be checked. Value's A-E cannot be allowed without at least one of 1-5 being checked. Multiple values in each section can be selected, as long as there is at least one value in each secti...
Hi there,
I experimenting with twitter streaming API,
I use Phirehose to connect to twitter and fetch the data but having problems storing it in files for further processing.
Basically what I want to do is to create a file named
date("YmdH")."."txt"
for every hour of connection.
Here is how my code looks like right now (not hand...
I am using PChart for PHP to draw graphs, it is working pretty well.
I have drawn a graph with intensities (2 = strong, 1 = medium, 0 = low) and I would like to know if is possible to show on the Y axis the description of the data (strong,medium,low) instead of the inappropriate numbers (2,1,0).
(I have search a lot without success, th...
Im looking for a script that will take OData feed and download some .wmv files based on the filenames held within the OData?
Can anyone help?
...