Hi guys first post on this site so excuse the formatting.
I'm new to xml parsing with php and well this xml feed has me stumped. I get using purely element based formats, but attributes this complex not so much. I tried to get the site to change to easier element based format but they're sticking with this format using attributes and I'...
What is the best way of implementing multi-level lists/bullets in php?
What I'm trying to implement is a system to take in short phrases, and categorize them within sections. However, at the same time, I would like to have each section to be collapsible and capable of having sub-sections within them.
For Example:
Section 10
Section 10...
I am working on a project that uses PHP , AS3, and AMFPHP .
The project allows users to upload and download images among other things. Since I am fairly new to PHP/FLash security I have been trying to gather as much info about making things as secure as possible. I've got some good advise about using .htaccess files, and a few other tri...
Hi,
I am writing a wordpress plugin. I would like to to set the post status to publish if post status is future.
I know one hook that is to be used that is pre_post_update.
However where is the array of post related details stored so that I can change the post_status?
Thanks for the help
...
function createPath($id, $category_tbl, $path) {
$s = "SELECT * FROM ".$category_tbl." WHERE ID = $id";
$r = mysql_query($s);
$row = mysql_fetch_array($r);
if($row['PARENT_ID'] == 0) {
$path .=$row['TITLE'].'-';
}
else {
$path .='-'.$row['TITLE'];
createPath($row['PARENT_ID'],$category_tb...
I'm working on building a system that aggregates content from several different RSS feeds and API's, stores it, and then outputs it with unique formatting based on the source of the content. My current plan is to create an XML structure for each unique type, storing each record using that structure in a MySQL database, and then retrievi...
I'm wondering how to get globally unique IDs for files and folders in Windows (XP, Vista and 7), and also be able to get the full path of the file or folder just by having the ID, something like getFileByGUID. I'm trying to do this in C++, C# and PHP.
The globally unique IDs should stay the same even if the file is moved, so using the f...
i have an html form full of text fields, checkbox's , and radio fields.
i wanted to get all the names of the fields so that i can get started in validating the information in them.
the method i am using to get them is
if(isset($_POST['submit'])) {
foreach($_POST as $name => $value) {
print $name."<br/>";
}
}
but i notic...
First off is there one? Or would I have to use javascript?
I'd like to be able to make changes to which CSS is used, so frex I could load smaller fonts for a mobile device, or whatever.
...
I've looked at how shadowhand (the main guy behind Kohana currently) set up his bootstrap.php file to handle exceptions on GitHub.
I thought, "that's cool", so I incorporated something similar.
However, instead of serving up a view, I'd like to send the request to a different route (or at least point it to a controller/action pair).
S...
i noticed that when posting a form the fields come out as an array.
like if i do
if(isset($_POST['submit'])) {
print_r($_POST);
}
what i usually do for form fields is the following.
lets say i have something like this (this is how i usually do it)
<form method="POST" action="">
<label>First Name: </label>
<input type="text" name="f...
What I am hoping to achieve is the ability to generate 'teams' of users. I will have x amount of men, weighted (decimal skill weight, like 75.23) and y amount of women (also with a skill weight value).
Given that list of users, I would then take for input the number of teams to make (let us say, 6 teams). Then, I go through the list o...
I know there are tonns of questions on here to validate a web address with something like this
/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i
The only problem is, not everybody uses the http:// or whatever comes before so i wanted to find a way to use the preg_match() but not checking for http as a must have but mor...
Is there a way to append or remove a line of text from a file using PHP.
I am in the process of writing a hosting control panel for my specific web hosting stack and would like to be able to make changes to the files with minimal requirements to touch the file system, and as such would like not to have to rewrite the whole file to add o...
Hello,
I've been looking for some open source (preferably PHP) online shop software that is relatively minimal but haven't had any success. The people that I'm developing the shop for are selling a very limited selection of items and only need PayPal intergration and as such don't need all the bells and whistles of the major open source...
How can i check if this key is the last in an array?
$array = array("a","b","c");
The value "c" would have the key 2, is there some code like this is_end(2) which returns true or false depending if they key is the last of the array? Or is there some kind of while() statement I can do?
...
Some of the new PHP 5.3 features, including namespaces and anonymous functions, are not compatible with PHPDocumentor, even with the latest release. For example, it just raises an error when it encounters "a function with no name", i.e. a closure. So, are there any other open-source tools that generate API documentation (preferably in HT...
Hi, am trying to insert images into a PDF using TCPDF, but am just getting blank pages. Here is my code:
if ((($_FILES["file"]["type"][0] == "image/gif")
|| ($_FILES["file"]["type"][0] == "image/jpeg")
|| ($_FILES["file"]["type"][0] == "image/pjpeg"))
&& ($_FILES["file"]["size"][0] < 1000001))
{
if ($_FILES["file"]["error"][0] > 0)
...
I need to make tet-a-tet comet chat with many channels using PHP as a backend and JQuery as a frontend. I need something like event-driven server to do this... But didnt find any simple and appplicable to my task. Please, tell me the best solution for this problem
...
When setting up a custom button at Paypal, you have the option under "Website Payment Preferences" to provide a link that Paypal will automatically redirect the user to upon successful completed payment.
Under the Payment Data Transfer you are given an "Identity Token". My presumption is that you can test for the presence of this identi...