Hey everyone,
I posted a question about this last night, but I don't think it was clear enough.
I am using the Zend_Gdata package with PHP to add events to my Google Calendar. I can successfully add events.
However, when I add an event, I want to add that event's URL to a database so that if I ever need to delete that event, I can ret...
I have a social network similar to myspace but I use PHP and mysql, I have been looking for the best way to show users bulletins posted only
fronm themself and from users they are confirmed friends with.
This involves 3 tables
friend_friend = this table stores records for who is who's friend
friend_bulletins = this stores the bulletins...
I have a table which has data from a graph.
for example
index value
0 3
1 5
2 7
3 6
4 8
5 9
6 12
7 11
8 10
9 14
10 13
I need to a query that returns the results where the value is at a local maximum, i.e. the value at a particular index is greater than the value at index+1 and in...
I have a simple if-else statement--if true, I'd like it to echo this content:
<div id="login">
<h2>Login</h2>
<div class="box">
<form method="POST" action="index.php/login">
Username/Email:<br />
<input type="text" name="username" value="<?php echo set_value("username"); ?>" size="50" class="form" />
<?php echo...
Using PHP.. I have a small app that I built that currently uses a querystring to navigate and grab data from a database. The key in the database is also in the string and that is not acceptable anymore. I need to change it. I would like to hide the db key and use a session in place of it but I'm not sure how to do that. In fact, there ar...
Hi !
(Yes, this is a quite opened and general and subjective question -- it's by design, cause I want tips you think are great !)
I'm using Eclipse PDT 2.1 to work in PHP, either for small and/or big projects -- I've been doing so for quite some times, now, actually (since before 1.0 stable, if I remember well)...
I was wondering if a...
Hi,
I am trying to write a screen scraper in php. I am having a nightmare trying to figure out how to do regular expressions. However I have found a library that is suppose to remove the need to use regular expressions when screen scraping. It is called simplehtmldom.
However I can't even figure out how to install it. I have downlo...
I have created a website.In that scaling an image option is created.. Now i want to store that scaled image in users desktop..But its saving in code existing folder..
Please help me by sending php script to store that file in desktop
...
I have a loop spitting out values and are put into a string:
$all_values = "";
while loop {
$value = "...";
$all_values .= $value . ",";
}
Output: 1,3,8,2,10...
What's the simplest way to output the same thing but numbers in reverse so the above example would come out like ...10,2,8,3,1
...
Hi,
I have an extremely large MySQL database (about 1 million items) and am running a fairly complex query on that database. It takes about 2 seconds when I enter the SQL command into phpMyAdmin but it takes around 1-2 minutes to generate that same output using PHP code.
Why would there be such a time difference? If it was a poorly ex...
I have following table structure and data in MySQL
CatID CatName ParentCatID
-------------------------------
1 Shirts NULL
2 Short Sleev 1
3 Long Sleev 1
4 Collarless 2
5 Collar 2
6 Collarless 3
7 Collar 3
8 Square Cut 4
9 Round Cut ...
i have a string .
i want to reverse the letters in every word not reverse the words order.
like - 'my string'
should be
'ym gnirts'
...
Hi
I am trying to create a back-end for my mobile application. I am sending an image's contents as a byte array in the HTTP request's body (output stream) I want to read this stream of bytes in the PHP script and get back an image.
Can someone please tell me how I can do that?
Thanks.
...
I need the path specified in $_SERVER['DOCUMENT_ROOT'] to be accessible in .htaccess file.
Is there a way to access it there?
I basically need to point to a file kept at the root and need the actual file system path and not the URL path. So instead of using a hard coded value, I'd like to be able to use a variable.
Thanks.
...
What runs faster?
Setting a default value and changing it-
$foo = "";
if($bar)
{
$foo = "someValue";
}
Or-
if($bar)
{
$foo = "someValue";
}
else
{
$foo = "";
}
...
I'm coding in PHP/MySQL and have the following query to fetch products and product group data:
SELECT products.id,products.name,product_groups.id,product_groups.name
FROM products
INNER JOIN product_groups
ON products.id=product_groups.id
WHERE products.name LIKE '%foobar%'
ORDER by product_groups.id ASC
So this query fetches products...
I have data which I wish to be pasted into a textbox, it will be in the form E.G
Ryu Aiter D78:21:87:13 177 /177 1 / 6
Ryu Chronos D78:21:26:21 182 /182 0 / 6
Ryu Hermes D78:21:26:22 201 /201 0 / 6
Ryu Hefaistos D78:31:75:10 136 /136 1 / 2
Ryu Krotos D78:84:96:11 170 /170 1 / 6
Ryu Heros D78:65:51:31 175 /175 2 / 5
Ryu Arachnos D78:13:8...
Is there any way to output all filtered data from the class Zend_Filter_Input?
...
I'm building a web page screen capture application for an internal R&D project.
Environment: Ubuntu 9.04 (default desktop install), Apache, PHP.
So far I've got a bash script that takes one parameter (URL), fires up firefox, grabs the screen and saves it as a PNG. I've tried running this from terminal and it works fine.
Here's the Bas...
I need a return false if the query fails... where do i put it...
function asas($username,$password){
$qry = "SELECT *
FROM members
WHERE login='$username' AND passwd='".md5($password)."'";
$result = mysql_query($qry);
while($row = mysql_fetch_array($result))
{
return(array($row['use...