On Tue, 13 Mar 2012 21:23:57 +0530, Gu®u sent:
No Michael, your code is also not working. What you have understood is
correct. let me explain it to others too.
If variable twitter and facebook are empty don't echo anything,
if variable twitter has a value and facebook is empty echo out only t
On Tue, 13 Mar 2012 17:33:43 +0530, Gu®u sent:
Hi,
Please help me with this code. I have 2 different fields in mysql table.
What I want is if the field is empty don't show the image. Please look at
the code below.
plugin->ListViewValue()=="")
{
echo '';
}
I tried the below code too considering may be the localhost is really dumb
and we need to tell each and every condition. But still its not working :(
$tweet = $search->plugin->ListViewValue();
$fb = $search->facebook->ListViewValue();
if($tweet=="" && $fb=="")
On Tue, Mar 13, 2012 at 4:53 PM, Gu®u wrote:
> No Michael, your code is also not working. What you have understood is
> correct. let me explain it to others too.
>
> If variable twitter and facebook are empty don't echo anything,
>
> if variable twitter has a value and facebook is empty echo out o
Hmm, what happens with the code I sent you? Just tested it on my end and
worked exactly as expected.
Try doing a
var_dump($search->plugin->ListViewValue(), $search->facebook->ListViewValue());
to make sure the data being returned is what's expected... you should be
getting string(0) "" returned f
No Michael, your code is also not working. What you have understood is
correct. let me explain it to others too.
If variable twitter and facebook are empty don't echo anything,
if variable twitter has a value and facebook is empty echo out only twitter,
if variable twitter has no value and faceb
>From looking at your code, the issue is that your if statements are
checking for the same criteria as your else statements, meaning that if the
string is empty ("") the if statements will be triggered, and since the if
statements are true, the elseif statement will not be. Or if the string
isn't
On Tue, Mar 13, 2012 at 3:06 PM, Gu®u wrote:
> The issue is both the images are echoing and no if else statement is
> working.
>
First of all, please bottom post on this (and probably any) mailing list.
You should perhaps provide what the contents of
$search->plugin->ListViewValue()=="" and
$sea
The issue is both the images are echoing and no if else statement is
working.
On Tue, Mar 13, 2012 at 7:22 PM, Matijn Woudt wrote:
> On Tue, Mar 13, 2012 at 1:03 PM, Gu®u wrote:
> > Hi,
> >
> > Please help me with this code. I have 2 different fields in mysql table.
> > What I want is if the fi
On Tue, Mar 13, 2012 at 1:03 PM, Gu®u wrote:
> Hi,
>
> Please help me with this code. I have 2 different fields in mysql table.
> What I want is if the field is empty don't show the image. Please look at
> the code below.
I have looked at it.
Maybe you should tell what is wrong, what it outputs
take a look at this:
http://datatables.net/examples/data_sources/server_side.html
On Mon, May 17, 2010 at 5:30 PM, nagendra prasad
wrote:
> Hi Artur,
>
> I am a beginner to this stuff. So, If you or anyone can give me some
> example
> codes or may be some links for my reference that would be a gr
Hi Artur,
I am a beginner to this stuff. So, If you or anyone can give me some example
codes or may be some links for my reference that would be a great help.
Best,
Guru.
On Mon, May 17, 2010 at 12:57 PM, Artur Ejsmont wrote:
> Hehe. Then a method: ) just make a query builder method like 'findS
Hehe. Then a method: ) just make a query builder method like 'findSongs'
with all the params ( optional or mandatory ) like page, limit, sortby,
filters etc. then inside build SQL based on args. Just be careful - SQL
injection is your enemy here. From app pass all the args from get/ post and
that'
DB is like more then 500MB
and it will grow day by day :)
On Mon, May 17, 2010 at 12:46 PM, Artur Ejsmont wrote:
> If the DB is very small use tablesorter plugin of jquery. Otherwise
> custumizable query method.
>
> On 17 May 2010 07:56, "nagendra prasad" wrote:
>
> Hi All,
>
> I have a datab
Abah Joseph wrote:
> I just saw something on pear.net
> http://pear.php.net/package/Services_Facebookmaybe it will work.
hi,
possible better is to have a look into the plattform
http://www.phpclasses.org. Maybe you find a class that doesn't based on
pear.
Regards,
Ruprecht
-
I just saw something on pear.net
http://pear.php.net/package/Services_Facebookmaybe it will work.
On Wed, Jan 21, 2009 at 10:27 PM, Chris wrote:
> Abah Joseph wrote:
>
>> Hello PHP people,
>> I`m looking for facebook and myspace API that will enable user to login on
>> my site using their faceb
Abah Joseph wrote:
Hello PHP people,
I`m looking for facebook and myspace API that will enable user to login on
my site using their facebook and myspace id. if this is not possible, can i
find something closer like, user will be able to perform
some activities from my site like inviting facebook/
TED]
> Sent: Thu, March 06, 2008 6:33 PM
> To: Gary Wardell; php-db@lists.php.net
> Subject: Re: [PHP-DB] Help with JOIN query
>
>
> On Thu, Mar 6, 2008 at 10:59 PM, Gary Wardell
> <[EMAIL PROTECTED]> wrote:
> > Ahh, to bad, I started using it with 5.0. I'm also a
On Thu, Mar 6, 2008 at 10:59 PM, Gary Wardell <[EMAIL PROTECTED]> wrote:
> Ahh, to bad, I started using it with 5.0. I'm also a long time user of SQL
> Server.
>
> Sorry if I caused confusion.
>
> Gary
>
You were getting my hopes up there Gary :-(
--
Graham
--
PHP Database Mailing List (h
Ahh, to bad, I started using it with 5.0. I'm also a long time user of SQL
Server.
Sorry if I caused confusion.
Gary
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Mysql doesn't support subselects in 4.0.x. That was added in 4.1.
-Roberto
J. Hill wrote:
> I may be a little confused: the desire is to return all the rows from
> TableA that match the record_id of a row in TableB that has the MAX
> timestamp?
>
> If so, why not something like:
>
> SELECT * FR
> To: J. Hill; php-db@lists.php.net
> Subject: Re: [PHP-DB] Help with JOIN query
>
>
> On Thu, Mar 6, 2008 at 9:54 PM, J. Hill <[EMAIL PROTECTED]> wrote:
> > I may be a little confused: the desire is to return all the
> rows from
> > TableA that match
On Thu, Mar 6, 2008 at 9:54 PM, J. Hill <[EMAIL PROTECTED]> wrote:
> I may be a little confused: the desire is to return all the rows from
> TableA that match the record_id of a row in TableB that has the MAX
> timestamp?
>
> If so, why not something like:
>
> SELECT * FROM TableA a, TableB b W
I may be a little confused: the desire is to return all the rows from
TableA that match the record_id of a row in TableB that has the MAX
timestamp?
If so, why not something like:
SELECT * FROM TableA a, TableB b WHERE a.record_id=b.record_id &&
timestamp=(SELECT MAX(timestamp) FROM TableB) O
This will give you:
ERROR : Invalid use of group function
It seems like the use of an aggregate (or how is it spelled?) function
is not allowed in a join statement...
/Krister
Jon L. wrote:
You can try adding a quick test to the ON statement...
SELECT * FROM TableA
INNER JOIN TableB
You can try adding a quick test to the ON statement...
SELECT * FROM TableA
INNER JOIN TableB
ON TableA.record_id = TableB.record_id
AND TableB.timestamp = MAX(TableB.timestamp)
Now, I haven't tested it.
I can only say the theory of it is accurate.
- Jon L.
On Thu, Mar 6, 2008 at 12:46 P
Hi again!
We're getting a bit of topic here, since this is pure SQL.. But anyway...
I've played around with this one a bit since it seemed quite
interesting... The best I can do is to get the oldest action...
select TableA.record_id, product_ref, action, time_stamp from TableA
join TableB on
Hi!
Graham Cossey wrote:
I was hoping to avoid joining everything as there can be many entries
in TableB for each record in TableA.
Also wouldn't your query only return one record? I need to return all
records from TableA with the latest action from TableB as well.
Yes, sorry - I realised th
On Thu, Mar 6, 2008 at 6:54 PM, Krister Karlström
<[EMAIL PROTECTED]> wrote:
> Hi!
>
>
> Graham Cossey wrote:
>
> > TableA
> > record_id
> > product_ref
> >
> > TableB
> > timestamp
> > record_id
> > action
> >
> > I want to create a SELECT that joins these 2 tables where the JOIN to
>
Hi!
Graham Cossey wrote:
TableA
record_id
product_ref
TableB
timestamp
record_id
action
I want to create a SELECT that joins these 2 tables where the JOIN to
TableB only returns the most recent entry by timestamp.
For instance, to select all columns:
select * from TableA
join TableB on Tab
Daniel Brown wrote:
On Feb 17, 2008 10:59 AM, Velen <[EMAIL PROTECTED]> wrote:
Hi Guys,
When inserting a value like 123567.8956 in my table it is rounding it to 2
decimal place. The field type is set as float.
Can anyone tell me why it's not taking all the decimals? and How to insert
the numb
On Feb 17, 2008 10:59 AM, Velen <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> When inserting a value like 123567.8956 in my table it is rounding it to 2
> decimal place. The field type is set as float.
>
> Can anyone tell me why it's not taking all the decimals? and How to insert
> the number with all
Velen wrote:
Hi Guys,
When inserting a value like 123567.8956 in my table it is rounding it to 2
decimal place. The field type is set as float.
Can anyone tell me why it's not taking all the decimals? and How to insert
the number with all the decimals?
Thanks
Velen
Hello Velen,
Your qu
Tim McGeary wrote:
Chris wrote:
Tim McGeary wrote:
Stut wrote:
Ok, so I did the recommended process of:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;
This allows the CLI script to run successf
Chris wrote:
Tim McGeary wrote:
Stut wrote:
Ok, so I did the recommended process of:
mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;
This allows the CLI script to run successfully, but the web ph
Tim McGeary wrote:
Stut wrote:
Tim McGeary wrote:
But I do have a MySQL 5 client:
[EMAIL PROTECTED] html]# rpm -qa MySQL*
MySQL-shared-compat-5.0.27-0.rhel3
MySQL-client-standard-5.0.27-0.rhel3
MySQL-python-0.9.1-6
MySQL-server-standard-5.0.27-0.rhel3
MySQL-devel-standard-5.0.27-0.rhel3
or ar
Stut wrote:
Tim McGeary wrote:
But I do have a MySQL 5 client:
[EMAIL PROTECTED] html]# rpm -qa MySQL*
MySQL-shared-compat-5.0.27-0.rhel3
MySQL-client-standard-5.0.27-0.rhel3
MySQL-python-0.9.1-6
MySQL-server-standard-5.0.27-0.rhel3
MySQL-devel-standard-5.0.27-0.rhel3
or are you saying that th
Tim McGeary wrote:
Thank you for the link. I think that's probably the best way to go in
this case, since it's only on a dev/test server. When I build the
production server, I should probably upgrade to PHP5 anyhow. I assume
that should not have this problem, right?
It might. PHP5 can be b
Stut wrote:
Tim McGeary wrote:
But I do have a MySQL 5 client:
[EMAIL PROTECTED] html]# rpm -qa MySQL*
MySQL-shared-compat-5.0.27-0.rhel3
MySQL-client-standard-5.0.27-0.rhel3
MySQL-python-0.9.1-6
MySQL-server-standard-5.0.27-0.rhel3
MySQL-devel-standard-5.0.27-0.rhel3
or are you saying that th
Tim McGeary wrote:
But I do have a MySQL 5 client:
[EMAIL PROTECTED] html]# rpm -qa MySQL*
MySQL-shared-compat-5.0.27-0.rhel3
MySQL-client-standard-5.0.27-0.rhel3
MySQL-python-0.9.1-6
MySQL-server-standard-5.0.27-0.rhel3
MySQL-devel-standard-5.0.27-0.rhel3
or are you saying that the PHP libs ha
Stut wrote:
Tim McGeary wrote:
Oh, duh! Ok. I wrote this:
mysql_connect($hostname, $username, $password) or
die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$result = mysql_query("SELECT * FROM Requestor_type") or
die(mysql_error());
Tim McGeary wrote:
Oh, duh! Ok. I wrote this:
mysql_connect($hostname, $username, $password) or
die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
$result = mysql_query("SELECT * FROM Requestor_type") or
die(mysql_error());
while($row = my
Stut wrote:
Tim McGeary wrote:
Tim McGeary wrote:
Stut wrote:
Tim McGeary wrote:
I am new to this list today, so if I should be sending this to
another
specific PHP list, please let me know.
I am getting the following error via the PHP web page I am building:
Warning: mysql_connect(): Can'
Tim McGeary wrote:
Please include the list in replies.
Sorry, I meant to, but hit the wrong button.
Tim McGeary wrote:
Stut wrote:
Tim McGeary wrote:
I am new to this list today, so if I should be sending this to another
specific PHP list, please let me know.
I am getting the following er
Please include the list in replies.
Sorry, I meant to, but hit the wrong button.
Tim McGeary wrote:
Stut wrote:
Tim McGeary wrote:
I am new to this list today, so if I should be sending this to another
specific PHP list, please let me know.
I am getting the following error via the PHP web
Stut wrote:
Tim McGeary wrote:
I am new to this list today, so if I should be sending this to another
specific PHP list, please let me know.
I am getting the following error via the PHP web page I am building:
Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/
Tim McGeary wrote:
I am new to this list today, so if I should be sending this to another
specific PHP list, please let me know.
I am getting the following error via the PHP web page I am building:
Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mys
from the
queries and it put a newline at the end of the output data.
Thanks everyone for the help with this.
-Original Message-
From: Oskar [mailto:[EMAIL PROTECTED]
Sent: Friday, March 24, 2006 1:59 AM
To: Mickey Martin; PHP db
Subject: Re: [PHP-DB] help with file downloads from MySQL
ot;, $data;
>
> When the file is saved, it begins with 0a followed by TEST TEXT and then
> the start of the file without another instance of 0a.
>
> Mickey
>
>
> -Original Message-
> From: Oskar [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 24, 2006 1:5
ith 0a followed by TEST TEXT and then the
start of the file without another instance of 0a.
Mickey
-Original Message-
From: Oskar [mailto:[EMAIL PROTECTED]
Sent: Friday, March 24, 2006 1:59 AM
To: Mickey Martin; PHP db
Subject: Re: [PHP-DB] help with file downloads from MySQL
Mick
it is
configured today.
Thanks,
Mickey
-Original Message-
From: Giff Hammar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 21, 2006 3:50 PM
To: 'Mickey Martin'; 'Bastien Koert'; php-db@lists.php.net
Subject: RE: [PHP-DB] help with file downloads from MySQL
Can you use somet
f
-Original Message-
From: Mickey Martin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 21, 2006 4:05 PM
To: 'Bastien Koert'; php-db@lists.php.net
Subject: RE: [PHP-DB] help with file downloads from MySQL
I tried purposely corrupting the file by adding blank spaces at the
beginning of
t: Tuesday, March 21, 2006 2:07 PM
To: [EMAIL PROTECTED]; php-db@lists.php.net
Subject: RE: [PHP-DB] help with file downloads from MySQL
If you load the data into the field with addslashes, have you tried
stripslashes on the way out?
Bastien
>From: "Mickey Martin" <[EMAIL PROTECTED]&
Here's the code I'm using to upload if it helps:
";
echo "Continue";
}
mysql_close();
} else {
?>
-Original Message-
From: Bastien Koert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 21, 2006 2:07 PM
To: [EMAIL PROTECTED]; php-db@lists.php.ne
hp-db@lists.php.net
Subject: RE: [PHP-DB] help with file downloads from MySQL
If you load the data into the field with addslashes, have you tried
stripslashes on the way out?
Bastien
>From: "Mickey Martin" <[EMAIL PROTECTED]>
>To: php-db@lists.php.net
>Subject: [PHP-DB] help
If you load the data into the field with addslashes, have you tried
stripslashes on the way out?
Bastien
From: "Mickey Martin" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] help with file downloads from MySQL
Date: Tue, 21 Mar 2006 12:55:56 -0600
Every time I try to download
Thanks so much, Naintara, simplifying the field name in the way you
suggested seems to fix it.
Andrew
On 2/20/06, Naintara <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Firstly, if you are assigning the value of variable $myrow['article_title']
> to $right_row,
> you should print $right_row and not $$righ
Hi,
Firstly, if you are assigning the value of variable $myrow['article_title']
to $right_row,
you should print $right_row and not $$right_row
Because, if say, $myrow['article_title'] contained value "article1",
$$right_row would look for variable
$article1, which probably doesn't exist, hence n
Martin is right...
carefully~
@ $db = new mysqli('localhost', 'root', 'password', 'database_table');
On 8/30/05, Richard Hart <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I'm new to PHP/MySQL and wondered if anyone on this list would be kind
> enough to help me solve
> this problem. I'm trying to autom
e-
From: Richard Hart [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 12:06 PM
To: Bastien Koert; php-db@lists.php.net
Subject: RE: [PHP-DB] Help with. .
Thanks for your help Bastien.
I have changed the authentication procedure but have come up against
another
problem.
This time I
ully logged on.';
}
else {
echo "Your username and/or password have not been accepted. Please go back and try again.";
}
Thanks
Richard
-Original Message-----
From: Bastien Koert [mailto:[EMAIL PROTECTED]
Sent: 30 August 2005 00:59
To: [EMAIL PROTECTED]; php-db@lists.ph
you don't have a connection to the db...either because the name.password, db
name are wrong or you lack the needed permissions to allow the query...
note that this query is a really back idea...opens the whole db up...better
to provide one connection and allow the users basic read write access
I apologize but I figured out my mistake.
Thanks
-Rich
-Original Message-
From: ReClMaples [mailto:[EMAIL PROTECTED]
Sent: Monday, April 25, 2005 10:05 PM
To: PHP
Subject: [PHP-DB] Help with PHP
I'm not sure if this is the correct distro to be sending this question to,
if it's not, let
(http://www.macromedia.com/devnet/mx/dreamweaver/articles/php_iis.html)
-Jeff
- Original Message -
From: "Jeffrey Moss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 17, 2004 12:08 PM
Subject: Re: [PHP-DB] help with mySQL- Fatal error: Call to undef
Gotta recompile php with the --with-mysql option (or something like that).
Try running configure --help
You can see what options you compiled with by grepping for CONFIGURE in your
Makefile. Here's what I got:
[EMAIL PROTECTED] php-5.0.0b4 # grep CONFIGURE Makefile
CONFIGURE_COMMAND = './configu
$sql_start = "SELECT * FROM table_name WHERE ";
If($_POST['first_name'] != '') {
$first_name = $_POST['first_name'];
$sql_start .= "first_name LIKE '%$first_name%' AND ";
}
If($_POST['last_name'] != '') {
$last_name = $_POST['last_name'];
$sql_start .= "last_name LIK
I use PHP to check the search form's input fields then add them to the SQL
statement if they contain data. And if you want the search to return all
records from the table (let's hope there's not many then) if no search terms
are provided then make the "WHERE" part of your SQL query an option based
Hello redhat,
Hey... look at this:
CREATE TABLE `testip` (
`id` int(10) unsigned NOT NULL auto_increment,
`theip` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `theip` (`theip`)
) TYPE=MyISAM AUTO_INCREMENT=7 ;
SELECT theip, SUBSTRING_INDEX( theip, ".", 1
[snip]
The IP's (for example 192.168.1.1) are all in a single field.
[/snip]
If it is a possiblity, I would store each IP in its own row, with a
column in that row being some kind of flag, like: is_issued as a logical
column.
Can you change you db layout or is it set in stone?
--
PHP Database M
UPDATE table
SET column = CONCAT(
MID( column, 2, LENGTH( column ) - 1 ),
MID( column, 1, 1 )
)
WHERE column LIKE 'M%'
HTH
Ignatius
_
- Original Message -
From: "Shaun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 10, 2004 14:15
Subjec
> > I have (among others) two DATE columns in a table; Booking_Date and
> > Booking_Completion_Date. How can I run a query that updates
> > Booking_Completion_Date to be 2 days after Booking_Date where
> > Booking_Completion_Date is NULL?
UPDATE table SET Booking_Completion_Date = Booking_Date + I
[Forwarded for Paxson Jr. because this was only sent to me.]
you can also easily use the mysql date functions
http://www.mysql.com/doc/en/Date_and_time_functions.html
On 05. Feb 2004, at 11:23 Uhr, Stuart Gilbert wrote:
Presuming you have the date in your PHP code you could simply add
172800 (
Presuming you have the date in your PHP code you could simply add 172800
(seconds in 2 days) to the current value and insert it in the same way
as you are doing with your current dates.
If you post how you're inserting your dates, what format you're using
and stuff like that then you'll probabl
SELECT COUNT(WMS_Area.Area_ID) AS complete_areas FROM WMS_Area, WMS_Bookings
WHERE WMS_Area.Area_ID = WMS_Bookings.Area_ID
AND MIN(WMS_Bookings.Booking_Status) = 2
GROUP BY WMS_Area.Area_ID
Or something like that.. there's probably a better way to do it..
On Fri January 23 2004 1:05 pm, Shau
Thanks for your reply,
but that only tells me how many complete Bookings there are. I need to know
how many Areas are complete i.e. for each Area where Bookings take place,
all of those Bookings have been completed.
Any ideas?
"Oòvn?Oòsis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PRO
Mensaje citado por Shaun <[EMAIL PROTECTED]>:
> Hi,
>
> I have a Bookings application. When a Booking is made it is entered in to
> the Bookings table. Bookings take place at Areas, held in the Areas table.
> Each Area has a unique Area_ID held in the Bookings table for each Booking.
> Each Booki
AIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Bunmi Akinmboni <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Content-Type: text/plain
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: 16 Oct 2003 15:12:38 +0200
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-DB] Help with file uplo
0
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-DB] Help with file upload
On Thu, 2003-10-16 at 09:58, Bunmi Akinmboni wrote:
> Thanks Neil. My ultimate aim to update my database with the details of
> the upload after it uploads successfully, but I need to solve this
> problem first.
On Thu, 2003-10-16 at 09:58, Bunmi Akinmboni wrote:
> Thanks Neil. My ultimate aim to update my database with the details of
> the upload after it uploads successfully, but I need to solve this
> problem first.
>
> The folder already has permission 777.
Dateiname: /home/www/web172/phptmp/phppYl
IL PROTECTED]>
Sent: Thursday, October 16, 2003 1:56 PM
Subject: Re: [PHP-DB] Help with file upload
> HI Nitin,
> Is that not dangerous as it will affect the entire server structure?
> Bunmi
>
> Nitin wrote:
>
> > permission is ok but it's got to be inside the hom
t;[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 16, 2003 1:28 PM
Subject: Re: [PHP-DB] Help with file upload
Thanks Neil. My ultimate aim to update my database with the details of
the upload after it uploads successfully, but I need to solve this
problem first.
The fo
permission is ok but it's got to be inside the home directory of web server,
which is /var/www by default for apache
Nitin
- Original Message -
From: "Bunmi Akinmboni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 16, 2003 1:28 PM
Subj
: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-DB] Help with file upload
I used this code now:
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
move_uploaded_file($_FILES['ufile1']['tmp_
L PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-DB] Help with file upload
I used this code now:
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
move_uploaded_file($_FILES[
TECTED]
Date: Thu, 16 Oct 2003 06:09:07 +0100
From: Bunmi Akinmboni <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-DB] Help with file upload
I used this code now:
if (is
I just changed the permission on fu folder to 777 but it gives me the
same problem. I'm writing this script so that I can use it to upload to
jpeg files. The code is hereby attached.
Bunmi
Gabriel Peugnet wrote:
For the message:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream
I just changed the permission on fu folder to 777 but it gives me the
same problem. I'm writing this script so that I can use it to upload to
jpeg files. The code is hereby attached.
Gabriel Peugnet wrote:
For the message:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
Pe
On Thu, 2003-10-16 at 07:14, John W. Holmes wrote:
> Bunmi Akinmboni wrote:
>
> > Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
> > Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6
>
> PHP runs as the web server and it does not have permission to
For the message:
> Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
> Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6
you have to change the permissions of the file folder where you are copying
the file.
If you created it via FTP then you can't use co
I used this code now:
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
move_uploaded_file($_FILES['ufile1']['tmp_name'],'./' .
$_FILES['ufile1']['name']);
This is the reply I got:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
Permission denied in /home/ayserve/pu
So what could be the problem? I reaaly don't know.
Bunmi
John W. Holmes wrote:
Bunmi Akinmboni wrote:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6
PHP runs as the web server and it does not have
Bunmi Akinmboni wrote:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6
PHP runs as the web server and it does not have permission to write to
the current directory. If you're using IIS, PHP runs as th
I used this code now:
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
move_uploaded_file($_FILES['ufile1']['tmp_name'],'./' .
$_FILES['ufile1']['name']);
This is the reply I got:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
Permission denied in /home/ayserve
This is reply I got:
Warning: move_uploaded_file(./ayservenet.jpg): failed to open stream:
Permission denied in /home/ayserve/public_html/fu/fuprocess.php on line 6
Warning: move_uploaded_file(): Unable to move '/tmp/phpfJyDSw' to
'./ayservenet.jpg' in /home/ayserve/public_html/fu/fuprocess.php
This in in the php manual
(http://www.php.net/manual/en/features.file-upload.php) but anyway...
The value contained in $_FILES['ufile1']['name'] is not the name of the
temporary file on the server. Try $_FILES['ufile1']['tmp_name'] instead
Hence the lines
if (is_uploaded_file($_FILES['ufile1']
Bunmi Akinmboni wrote:
His is the new code:
You should be using move_uploaded_file() instead of copy(), first of all.
Next, the two arguments passed to either copy() or move_uploaded_file()
are _filenames_, not directories. So something like
move_uploaded_file($_FILES['ufile1']['tmp_name'],'./'
His is the new code:
if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
copy($_FILES['ufile1']['tmp_name'], ".");
echo "$ufile1_name ";
echo "DONE";
echo " ";
print_r($_FILES);
} else {
echo "Possible file upload attack. Filename: " .
$_FILES['ufile1']['name'];
echo " ";
print_r
Thanks John,
I had done it before and still tried it again now. This is what I get:
Warning: copy(.): failed to open stream: Is a directory in
/home/ayserve/public_html/fu/fuprocess.php on line 6
ayservenet.jpg DONE Array ( [ufile1] => Array ( [name] => ayservenet.jpg
[type] => image/pjpeg [tmp_n
Bunmi Akinmboni wrote:
Pls Help.
I have done a lot of reading prior to this yet I just can't seem make it
work. I wrote an upload program as seen below but the response I got was:
Possible file upload attack. Filename: ayservenet.jpg Array ( [ufile1]
=> Array ( [name] => ayservenet.jpg [type] =
and put it inside a transaction cos in case something goes wrong part of
the way through
pete
Jeff Shapiro wrote:
This should do it:
UPDATE Bookings
SET
Booking_Start_Date = CONCAT(DATE_FORMAT(Booking_Start_Date,
'%Y-%m-%d'), '09:00:00'),
Booking_End_Date = CONCAT(DATE_FORMAT(Booking_End_Date
1 - 100 of 166 matches
Mail list logo