Hey, say I have a url just being passed through my php is there any easy way to get some GET variables that are being passed through it? It's not the actual url of the page or anything.
like a just have a string containing
http://www.somesite.com/index.php?url=var&file_id=var&test=var
Whats the best way to get the values for ...
I'm trying to loop through a set of records, all of which have a "number" property. I am trying to check if there are 3 consecutive records, e.g 6, 7 and 8.
I think i'm almost there with the code below, have hit the wall though at the last stage - any help would be great!
$nums = array();
while (count($nums <=...
IMDb has an individual RSS feed for every single movie that they have listed. I have a site that has a lot of pages associated with movies, and I stored an IMDB id with each one.
I wanted to show top 5 results from each RSS feed, for each individual movie. The feed looks like this:
http://rss.imdb.com/title/tt1013743/news
As you can im...
I cant get around on how to express this is PHP.
I have 100 and 420 as my min and max value that I wish to obtain.
Than lets suppose I have:
1000
4534
34566
123145
12312265
Now, how can I say:
Take 4534 and knowing that 1000 = 420 and 12312265 = 100 determine 4534 value.
To make it more clear, Im trying to represent web page ranks...
Hi all, I'm currently trying dynamically create an html table in PHP. Further, I want the first two lines to be a different color. The solution I see is to give them a class and then use css to color the lines.
if ($count<=2){
echo "<tr> class='color'";
}else
echo"<tr>";
//other code
echo"</tr>";
Problem is my code prints out th...
I'm currently trying to use the current session of a php web page from an applet. I tought it would be straightforward, but it didn't go as smooth as I tough. From the php man:
session_start() creates a session or resumes the current one based on a session
identifier passed via a GET or POST request, or passed via a cookie.
From ther...
Many database libraries come setup for multiple database connections - but I've never actually known of an scripting application that needed to connect to two databases during it's run. (compiled, daemon-running languages are a different matter).
I understand having database slaves so that you can spread the load out - but usually on s...
I'm trying to do a many to many query on these fields. I'd like to get:
1) all the posts that are in a category
2) all the categories that are in a post
3) all the posts that are in a category that have a specific id
posts
+-------------+--------------+
| id | int(11) |
| title | varchar(255) |
| body |...
I am running PHP on Windows. PHP plugins on Windows are just DLL's in an extensions folder, and I can do little to configure these plugins.
For example, the ADAP plugin (which is OpenLDAP itself) has settings that I can't change on runtime. Luckily, OpenLDAP allows me to change some of these settings by messing with the environment vari...
I'm trying to find the best way to calculate the box size needed for shipping.
I have 3 shipping containers with different sizes. I have the product's width, length, depth, and mass defined in the database.
I would like to know how to find the smallest amount of boxes needed to ship, and also the smallest dimensions of those boxes give...
I'm writing a WordPress plugin, and one of the features is removing duplicate whitespace.
My code looks like this:
return preg_replace('/\s\s+/u', ' ', $text, -1, $count);
I don't understand why I need the u
modifier. I've seen other plugins
that use preg_replace and don't
need to modify it for Unicode. I
believe I have a default in...
I am grabbing the time from a list of ids. Not every id has a time associated with it.
How can I tell if there are no results (EG ID is not in the table yet) and then not get lots of Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 9 in /home/aslum/... errors...
$tquery = "SELECT time ".
...
Hi,
Im trying to create a query filter system in codeigniter. Basically, within a particular query, Id like to be able to send a list of values returned by the main query (working with items for sale on different sites, so for instance, price, and website), output them to my sidebar, and then be able to drill down the results via the va...
hi all..this is my code:
$Line = mysql_real_escape_string(postVar("showline"));
$Model = mysql_real_escape_string(postVar("showmodel"));
$NIK = mysql_real_escape_string(postVar("showNIK"));
$sql ="SELECT NIK,Line,Model FROM inspection_report";
$sql.="WHERE NIK='".$NIK."' AND Model LIKE '%".$Model."%' AND...
I am working on an open source PHP/MySQL application
I have looked at phpBB, Wordpress, and other apps to see if they specified Foreign Keys or not (to ensure referential integrity)
I cannot find that they have
Is it a common practice in these types of applications to specify Foreign Keys in the MySQL database structure?
...
I have two nodes, one is kind of a parent to the other node. For example, I'm displaying information about Plants. There are two nodes, Plant_Parent which has the latin name and some common names which is moderated, and then there is the Plant_Info which is not moderated and it has information like bloom time, growing experience, water r...
I have a php script that will generate zip file.
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=random_name.zip");
echo $zipfile->file();
The filename is random and the server script doesn't even come with a return-file-uri function.
So my question is that how jQuery can handle thi...
Hi There,
I've been all over the internet reading up on APC, and it seems like a nifty way to detect file Uploading.
I am, however, having a problem.
I know how to call files and everything using Ajax, and that is what I am planning to do, but for Testing sake, I'm doing something like this.
Ok, so I have 3 files.
form.php
upload.ph...
While looking over the doc's for urldecode() I came across this note:
The superglobals $_GET and $_REQUEST
are already decoded. Using urldecode()
on an element in $_GET or $_REQUEST
could have unexpected and dangerous
results.
This is the reason why a get variable with the value of %26 ends up being &. Are there any other ...
i have a problem with gettin photos using facebook graph.no errors gives,but it return empty array
permissions that i gave
$par['req_perms'] = "publish_stream,
offline_access,
user_status, user_photos or friend_photos,
user_videos or friend_videos, read_stream,
...