[PHP-DB] Page cannot be displayed problems

2004-04-29 Thread matthew perry
My bosses computer gets a Page cannot be displayed message when she 
uses some of my pages.  I have tried to find a pattern as to why this 
happens on only her computer.  I think the problem only occurs when she 
links to a page that links to a page.

Say I have 3 pages: page1.php, page2.php, and page3.php

On page1.php

form action=page2.php method=PUT
input type=submit value=GO
/form   


And on page2.php

meta http-equiv=refresh content=0;URL=page3.php

If I click go on page1.php I SOMETIMES get the cannot be displayed 
message.  SOMETIMES it works even on her computer!

Anyone know why?

- Matthew Perry

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Page cannot be displayed problems

2004-04-29 Thread Uzi
form action=page2.php method=PUT ???
is that a new standard?


- Original Message - 
From: matthew perry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 8:11 AM
Subject: [PHP-DB] Page cannot be displayed problems


 My bosses computer gets a Page cannot be displayed message when she 
 uses some of my pages.  I have tried to find a pattern as to why this 
 happens on only her computer.  I think the problem only occurs when she 
 links to a page that links to a page.
 
 Say I have 3 pages: page1.php, page2.php, and page3.php
 
 On page1.php
 
 form action=page2.php method=PUT
 input type=submit value=GO
 /form   
 
 
 And on page2.php
 
 meta http-equiv=refresh content=0;URL=page3.php
 
 
 If I click go on page1.php I SOMETIMES get the cannot be displayed 
 message.  SOMETIMES it works even on her computer!
 
 Anyone know why?
 
 - Matthew Perry
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Page cannot be displayed problems

2004-04-29 Thread Viorel Dragomir
Nope.
An obsolete standard.

Try use GET or POST instead of PUT.

Cheers
  - Original Message - 
  From: Uzi 
  To: matthew perry ; [EMAIL PROTECTED] 
  Sent: Thursday, April 29, 2004 10:13
  Subject: Re: [PHP-DB] Page cannot be displayed problems


  form action=page2.php method=PUT ???
  is that a new standard?


  - Original Message - 
  From: matthew perry [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, April 29, 2004 8:11 AM
  Subject: [PHP-DB] Page cannot be displayed problems


   My bosses computer gets a Page cannot be displayed message when she 
   uses some of my pages.  I have tried to find a pattern as to why this 
   happens on only her computer.  I think the problem only occurs when she 
   links to a page that links to a page.
   
   Say I have 3 pages: page1.php, page2.php, and page3.php
   
   On page1.php
   
   form action=page2.php method=PUT
   input type=submit value=GO
   /form   
   
   
   And on page2.php
   
   meta http-equiv=refresh content=0;URL=page3.php
   
   
   If I click go on page1.php I SOMETIMES get the cannot be displayed 
   message.  SOMETIMES it works even on her computer!
   
   Anyone know why?
   
   - Matthew Perry
   
   -- 
   PHP Database Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
   
   
   

  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Page cannot be displayed problems

2004-04-29 Thread Mikael Grön
As Uzi and Viorel already pointed out, use GET or POST instead of PUT.
Also, to be certain of the redirect, use:
?php
	header(Location: page3.php);
	exit;
?
instead of the meta redirect.
First of all, I'm sure there are browsers that don't support META 
redirects, secondly, using the PHP header function, you will get no 
waiting time what so ever when moving to page 3. The META redirect 
tells the browser to move, while the header command tells the browser 
directly to go to page3. instead of loading page2 first.

Does the composition of above sentences give you a hint that I'm 
extremely tired right now? ;)

Mike

On Apr 29, 2004, at 07:11, matthew perry wrote:

My bosses computer gets a Page cannot be displayed message when she 
uses some of my pages.  I have tried to find a pattern as to why this 
happens on only her computer.  I think the problem only occurs when 
she links to a page that links to a page.

Say I have 3 pages: page1.php, page2.php, and page3.php

On page1.php

form action=page2.php method=PUT
input type=submit value=GO
/form   
And on page2.php

meta http-equiv=refresh content=0;URL=page3.php

If I click go on page1.php I SOMETIMES get the cannot be displayed 
message.  SOMETIMES it works even on her computer!

Anyone know why?

- Matthew Perry

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] assigning variables after one-to-many query

2004-04-29 Thread Uzi

- Original Message - 
From: Rachel Rodriguez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 23, 2004 3:55 AM
Subject: [PHP-DB] assigning variables after one-to-many query


 Hi!

 I have a one-to-many relationship between two tables
 (table1 and table3) with a linking table between
 them (table2):

 table1:  table2
 +---++   +---++
 |id | f_name |   |id | emailID|
 +---++   +---++
 | 1 | bill   |   | 1 |   1|
 | 2 | john   |   | 1 |   4|
 | 3 | diana  |   | 1 |   3|
 | 4 | victor |   | 2 |   2|
 | 5 | renata |   | 4 |   5|
 +---++   +---++

 table3
 ++-+
 |emailID | email   |
 ++-+
 |   1| [EMAIL PROTECTED]|
 |   2| [EMAIL PROTECTED] |
 |   3| [EMAIL PROTECTED]  |
 |   4| [EMAIL PROTECTED] |
 |   5| [EMAIL PROTECTED] |
 ++-+

 I would like to write a query that matches table1.id
 with records
 from table3.emailID via the linking table (table2) and
 then
 assign each match to a variable.

 Here is what I have:

 $query = SELECT t3.email
   FROM   table3 AS t3
   LEFT JOIN table2 AS t2
   ON (t3.emailID = t2.emailID)
   LEFT JOIN table1 AS t1
   ON (t2.id = t1.id)
   WHERE t1.id = 1;

 $result = @myql_query($query, $db_connection);

 $num = mysql_num_rows($result);

 $email1 = ;
 $email2 = ;
 $email3 = ;

 if ($num  0)
 {
 while ($row = mysql_fetch_array($result))
 {
// do something here to assign
// $email1 = $row[email] and
// $email2 = $row[email], etc.
 }
 }

 Of course, the problem I am having is as I am going
 through the while loop, I am assigning $email1,
 $email2, and so on the

 same e-mail address.

 I would like to get: $email1 = [EMAIL PROTECTED],
 $email2 = [EMAIL PROTECTED], and $email3 =
 [EMAIL PROTECTED]


what i would do is add it into an array:

$emails = Array();
while ($row = mysql_fetch_array($result,MYSQL_NUM))
{
$emails[] = $row[0];
}

then u have an array with :

$emails[0] = [EMAIL PROTECTED]
$emails[1] =  [EMAIL PROTECTED]
etc...



 I would prefer to do that rather than what I have seen
 in most examples which is similar to the following:

 // snippet of code

  while ($row = mysql_fetch_array($result))
  {
   echoBill's email is $row[email].;
  }

 // end of snippet

 Any assistance is greatly appreciated.

 Thanks,
 Rachel




 __
 Do you Yahoo!?
 Yahoo! Photos: High-quality 4x6 digital prints for 25¢
 http://photos.yahoo.com/ph/print_splash

 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] converting scripts for register_globals=Off

2004-04-29 Thread Mikael Grön
Since I have a thing for using one file for all things in i.e. an admin 
script, I use POST and GET variables at the same time. Getting them 
mixed up is extremely hazardous.. I do stuff like:
	a href=admin.php?action=deleteid=2Delete post/a
which leads to the section of the admin script;
	?php
	if ($_GET['action'] == delete  $_GET['id']) {
		// lots of PHP doing lots of stuff
	} else {
		// the link
	}
	?
Now, if there's a POST variable named ID containing an INT matching the 
database, and I use $_REQUEST instead of $_GET, I'm in trouble!

Mike

On Apr 29, 2004, at 11:00, Ignatius Reilly wrote:

even better:
$_REQUEST['variable_name']
so that you don't have to bother checking both depending on whether 
your
form was GETted or POSTed.

_
- Original Message -
From: Mikael Grön [EMAIL PROTECTED]
To: Kim Jacobs (Crooks) - Mweb [EMAIL PROTECTED]; 
[EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 11:54 AM
Subject: Re: [PHP-DB] converting scripts for register_globals=Off

What register_globals does (Please correct me if I'm wrong) is convert
i.e. $_POST['variable_name'], $_GET['variable_name'] and so on to
$variable_name. which isn't very good from my point of view.
I suggest you make sure you use $_GET['your_variable'] when ever you're
fetching a GET variable, $_POST['var'] for all post variables and so
on, instead of what you're doing now.
This works just fine with register_globals = On as well, so I always
use it... to be safe..
Mike

On Apr 29, 2004, at 10:40, Kim Jacobs (Crooks) - Mweb wrote:

if any of you could help me out, I would greatly appreciate it... I am
an absolute beginner to php (2 weeks now) and dont know what I dont
know...
I have written some scripts to access my online SQL db and I've tested
the scripts on my machine with PHP 4.3.6 and register_globals = On
Now where I host my site, uses PHP 4.3.5 and has register_globals =
Off which means of course, that my scripts arent working, but I dont
know why
My question is, how do I convert my scripts so that they will work
please? I know that $id and $submit are two of the 'inputs' that it
doesnt like, but I dont know the rest
Tx
K
MWEB: S.A.'s most trusted and reliable Internet Service Provider. Just
Like That.
To join, go to: http://join.mweb.co.za or call 0860032000.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] converting scripts for register_globals=Off

2004-04-29 Thread Ignatius Reilly
If your form is well designed, there should NOT be another POST variable
named ID or id used for a different purpose.
Your form data validation routine will examine the 2-uple ( action, id), not
id alone. therefore no problem.
In many cases I find it convenient to design a page so that it can be called
indifferently by POST or GET.

Just my 2 Belgian francs.
Ignatius
_
- Original Message -
From: Mikael Grön [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 12:42 PM
Subject: Re: [PHP-DB] converting scripts for register_globals=Off


Since I have a thing for using one file for all things in i.e. an admin
script, I use POST and GET variables at the same time. Getting them
mixed up is extremely hazardous.. I do stuff like:
a href=admin.php?action=deleteid=2Delete post/a
which leads to the section of the admin script;
?php
if ($_GET['action'] == delete  $_GET['id']) {
// lots of PHP doing lots of stuff
} else {
// the link
}
?
Now, if there's a POST variable named ID containing an INT matching the
database, and I use $_REQUEST instead of $_GET, I'm in trouble!

Mike


On Apr 29, 2004, at 11:00, Ignatius Reilly wrote:

 even better:
 $_REQUEST['variable_name']

 so that you don't have to bother checking both depending on whether
 your
 form was GETted or POSTed.

 _
 - Original Message -
 From: Mikael Grön [EMAIL PROTECTED]
 To: Kim Jacobs (Crooks) - Mweb [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Thursday, April 29, 2004 11:54 AM
 Subject: Re: [PHP-DB] converting scripts for register_globals=Off


 What register_globals does (Please correct me if I'm wrong) is convert
 i.e. $_POST['variable_name'], $_GET['variable_name'] and so on to
 $variable_name. which isn't very good from my point of view.

 I suggest you make sure you use $_GET['your_variable'] when ever you're
 fetching a GET variable, $_POST['var'] for all post variables and so
 on, instead of what you're doing now.
 This works just fine with register_globals = On as well, so I always
 use it... to be safe..

 Mike


 On Apr 29, 2004, at 10:40, Kim Jacobs (Crooks) - Mweb wrote:

 if any of you could help me out, I would greatly appreciate it... I am
 an absolute beginner to php (2 weeks now) and dont know what I dont
 know...

 I have written some scripts to access my online SQL db and I've tested
 the scripts on my machine with PHP 4.3.6 and register_globals = On
 Now where I host my site, uses PHP 4.3.5 and has register_globals =
 Off which means of course, that my scripts arent working, but I dont
 know why

 My question is, how do I convert my scripts so that they will work
 please? I know that $id and $submit are two of the 'inputs' that it
 doesnt like, but I dont know the rest

 Tx
 K


 MWEB: S.A.'s most trusted and reliable Internet Service Provider. Just
 Like That.

 To join, go to: http://join.mweb.co.za or call 0860032000.

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] converting scripts for register_globals=Off

2004-04-29 Thread John W. Holmes
From: Kim Jacobs (Crooks) - Mweb [EMAIL PROTECTED]


 I have written some scripts to access my online
 SQL db and I've tested the scripts on my machine
 with PHP 4.3.6 and register_globals = On
 Now where I host my site, uses PHP 4.3.5 and has
 register_globals = Off which means of course, that
 my scripts arent working, but I dont know why

 My question is, how do I convert my scripts so that they
 will work please? I know that $id and $submit are two
 of the 'inputs' that it doesnt like, but I dont know the rest

If your program is well written, you can get away with just switching $id
for $_REQUEST['id'].

This is assuming you already properly validate and sanitize all of the data
coming from the user. Using $_REQUEST['id'] doesn't make anything more or
less secure, it's a matter of what you're doing with the data coming from
the user.

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Pear - autoExecute()

2004-04-29 Thread pete M
Am trying the following bit of code usind the PEAR DB.php class

$table = 'reports';
$fields = array('report_name' = $_POST['report_name'],
'report_desc' = $_POST['report_desc']
);
$res = $db-autoExecute($table,$fields,DB_AUTOQUERY_INSERT);
if (DB::isError($res)) {
die($res-getMessage());
}
However I get the error
Fatal error: Call to undefined function: autoexecute() in 
/home/jp/public_html/v1/reports.php on line 19

I'm using the $db-query() methods and getALL etc so I know the class is 
loaded and working.

Is there a library I'm missing

tia

Pete

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Pear - autoExecute()

2004-04-29 Thread Uzi Klein

http://pear.php.net/manual/en/package.database.php



-Original Message-
From: pete M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 14:03
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Pear - autoExecute()

Am trying the following bit of code usind the PEAR DB.php class

$table = 'reports';
$fields = array('report_name' = $_POST['report_name'],
 'report_desc' = $_POST['report_desc']
 );
$res = $db-autoExecute($table,$fields,DB_AUTOQUERY_INSERT);

if (DB::isError($res)) {
 die($res-getMessage());
}

However I get the error
Fatal error: Call to undefined function: autoexecute() in 
/home/jp/public_html/v1/reports.php on line 19

I'm using the $db-query() methods and getALL etc so I know the class is 
loaded and working.

Is there a library I'm missing

tia

Pete

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Pear - autoExecute()

2004-04-29 Thread pete M
That's where I copied the code below that does not work ;-(

Uzi Klein wrote:

http://pear.php.net/manual/en/package.database.php



-Original Message-
From: pete M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 14:03
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Pear - autoExecute()

Am trying the following bit of code usind the PEAR DB.php class

$table = 'reports';
$fields = array('report_name' = $_POST['report_name'],
 'report_desc' = $_POST['report_desc']
 );
$res = $db-autoExecute($table,$fields,DB_AUTOQUERY_INSERT);
if (DB::isError($res)) {
 die($res-getMessage());
}
However I get the error
Fatal error: Call to undefined function: autoexecute() in 
/home/jp/public_html/v1/reports.php on line 19

I'm using the $db-query() methods and getALL etc so I know the class is 
loaded and working.

Is there a library I'm missing

tia

Pete

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Pear - autoExecute()

2004-04-29 Thread Uzi Klein
Did you use  $db = new DB; ?

-Original Message-
From: pete M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 14:31
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Pear - autoExecute()

That's where I copied the code below that does not work ;-(

Uzi Klein wrote:

 http://pear.php.net/manual/en/package.database.php
 
 
 
 -Original Message-
 From: pete M [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 29, 2004 14:03
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Pear - autoExecute()
 
 Am trying the following bit of code usind the PEAR DB.php class
 
 $table = 'reports';
 $fields = array('report_name' = $_POST['report_name'],
  'report_desc' = $_POST['report_desc']
  );
 $res = $db-autoExecute($table,$fields,DB_AUTOQUERY_INSERT);
 
 if (DB::isError($res)) {
  die($res-getMessage());
 }
 
 However I get the error
 Fatal error: Call to undefined function: autoexecute() in 
 /home/jp/public_html/v1/reports.php on line 19
 
 I'm using the $db-query() methods and getALL etc so I know the class is 
 loaded and working.
 
 Is there a library I'm missing
 
 tia
 
 Pete
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Pear - autoExecute()

2004-04-29 Thread Uzi Klein

http://pear.php.net/manual/en/package.database.db.db-common.autoexecute.php


-Original Message-
From: pete M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 14:31
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Pear - autoExecute()

That's where I copied the code below that does not work ;-(

Uzi Klein wrote:

 http://pear.php.net/manual/en/package.database.php
 
 
 
 -Original Message-
 From: pete M [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 29, 2004 14:03
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Pear - autoExecute()
 
 Am trying the following bit of code usind the PEAR DB.php class
 
 $table = 'reports';
 $fields = array('report_name' = $_POST['report_name'],
  'report_desc' = $_POST['report_desc']
  );
 $res = $db-autoExecute($table,$fields,DB_AUTOQUERY_INSERT);
 
 if (DB::isError($res)) {
  die($res-getMessage());
 }
 
 However I get the error
 Fatal error: Call to undefined function: autoexecute() in 
 /home/jp/public_html/v1/reports.php on line 19
 
 I'm using the $db-query() methods and getALL etc so I know the class is 
 loaded and working.
 
 Is there a library I'm missing
 
 tia
 
 Pete
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Pear - autoExecute()

2004-04-29 Thread pete M
yep
This is from config.inc.php
$dsn = mysql://$username_DB:[EMAIL PROTECTED]/$database_DB;
//echo $dsn;
require_once('../includes/DB/DB.php');
$db = DB::connect($dsn,true);
if (DB::isError($db)) {
   die ($db-getMessage());}
$db-setFetchMode(DB_FETCHMODE_ASSOC);
I'm using the getAll(), query(), getOne(), etc ok - it just doesnt see 
autoExecute() ??

Or I'm missing the obvious !

pete ;-)

Uzi Klein wrote:
Did you use  $db = new DB; ?

-Original Message-
From: pete M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 14:31
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Pear - autoExecute()

That's where I copied the code below that does not work ;-(

Uzi Klein wrote:


http://pear.php.net/manual/en/package.database.php



-Original Message-
From: pete M [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 14:03
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Pear - autoExecute()

Am trying the following bit of code usind the PEAR DB.php class

$table = 'reports';
$fields = array('report_name' = $_POST['report_name'],
'report_desc' = $_POST['report_desc']
);
$res = $db-autoExecute($table,$fields,DB_AUTOQUERY_INSERT);
if (DB::isError($res)) {
die($res-getMessage());
}
However I get the error
Fatal error: Call to undefined function: autoexecute() in 
/home/jp/public_html/v1/reports.php on line 19

I'm using the $db-query() methods and getALL etc so I know the class is 
loaded and working.

Is there a library I'm missing

tia

Pete



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Page cannot be displayed problems

2004-04-29 Thread JeRRy
Date: Thu, 29 Apr 2004 01:11:35 -0500 
From: matthew perry [EMAIL PROTECTED] 
To: [EMAIL PROTECTED] 
Subject: Page cannot be displayed problems 

My bosses computer gets a Page cannot be displayed
message when she 
uses some of my pages.  I have tried to find a pattern
as to why this 
happens on only her computer.  I think the problem
only occurs when she 
links to a page that links to a page.

Say I have 3 pages: page1.php, page2.php, and
page3.php

On page1.php

form action=page2.php method=PUT
input type=submit value=GO
/form   


And on page2.php

meta http-equiv=refresh content=0;URL=page3.php


If I click go on page1.php I SOMETIMES get the
cannot be displayed 
message.  SOMETIMES it works even on her computer!

Anyone know why?

- Matthew Perry



Hi,

I have just encountered the same problem.  The site
was working fine a few days ago but now it shows up as
a 404 error however the files exist in the directory
in question on the web server.

Has there been a new release of php/apache/mysql or
something that has caused some forms to not work?

I can't find a problem at all nor has the files that
produce 404's have been edited at all in a long time. 
So they should not be different and therefore work.

Another things I thought of was cookies, clearing
cookies etc.  

And as I speak I just cleared mine and they bloody
(excuse me) worked.  I can login and use forms...
Well, that is weird.  I suggest you clear your
cookies!  I just did and it worked wonders, I've NEVER
HAD to do that EVER in the passed.  Maybe they got
altered/corrupted or something??

J

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Dynamic Graphing Software

2004-04-29 Thread Rafi Sheikh
Hi every one!  I am looking for recommendations for using software to
produce dynamic graphs with a APM solution.  Any suggestions?

-
Rafi Sheikh


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Dynamic Graphing Software

2004-04-29 Thread Viorel Dragomir
jpgraph
:)
  - Original Message - 
  From: Rafi Sheikh 
  To: '[EMAIL PROTECTED]' 
  Sent: Thursday, April 29, 2004 16:18
  Subject: [PHP-DB] Dynamic Graphing Software


  Hi every one!  I am looking for recommendations for using software to
  produce dynamic graphs with a APM solution.  Any suggestions?

  -
  Rafi Sheikh


  This e-mail, including attachments, may include confidential and/or
  proprietary information, and may be used only by the person or entity to
  which it is addressed. If the reader of this e-mail is not the intended
  recipient or his or her authorized agent, the reader is hereby notified that
  any dissemination, distribution or copying of this e-mail is prohibited. If
  you have received this e-mail in error, please notify the sender by replying
  to this message and delete this e-mail immediately.

  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] converting scripts for register_globals=Off

2004-04-29 Thread jeffreyb
If you have already have a number of scripts and, especially, if you are doing 
things with the variables inside the script (in other words, the variables 
appear more than once), it can be more convenient to convert at the top of 
each page, eg:

$id = $_REQUEST['id'];
$this = $_REQUEST['this'];
$that = $_SERVER['that'];

etc...

Jeffrey  Baumgartner

Date sent:  Thu, 29 Apr 2004 11:40:14 +0200
From:   Kim Jacobs (Crooks) - Mweb 
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject:[PHP-DB] converting scripts for register_globals=Off

 if any of you could help me out, I would greatly appreciate it... I am
 an absolute beginner to php (2 weeks now) and dont know what I dont
 know...
 
 I have written some scripts to access my online SQL db and I've tested
 the scripts on my machine with PHP 4.3.6 and register_globals = On Now
 where I host my site, uses PHP 4.3.5 and has register_globals = Off
 which means of course, that my scripts arent working, but I dont know
 why
 
 My question is, how do I convert my scripts so that they will work
 please? I know that $id and $submit are two of the 'inputs' that it
 doesnt like, but I dont know the rest
 
 Tx
 K
 
  
 MWEB: S.A.'s most trusted and reliable Internet Service Provider. Just
 Like That. 
 
 To join, go to: http://join.mweb.co.za or call 0860032000.
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] From mysql to mssql...

2004-04-29 Thread Tristan . Pretty
I use PHP/MySQL daily..
love it, live it breath it...

However, I've been given a one page project to do, that needs to add the 
contecnt of a form to an mssql database...

I'm fine with doing all the page, apart from talking to mssql... how 
drasitally does this differ from the standard mysql functions tha tI 
use..?

(Also, I nearly ahd to do it in asp... I'd never used it before, but after 
lookign at it, it made me damned happy that I use PHP.. way more user 
friendly!!)

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PHP Training

2004-04-29 Thread Rafi Sheikh
Any one know of a good training course for PHP (beg to intermediate-1-3
days) in the twin cities area?

Best regards,

RS


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] search engines

2004-04-29 Thread redhat
Anyone out there know of a good tutorial on creating a php/mysql based
search engine script?  I would like to write one for a small in-house
application that I am running.
thanks,
DF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] search engines

2004-04-29 Thread Jeffrey Moss
Read up on MySQL full text search.

http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html

-Jeff

- Original Message - 
From: redhat [EMAIL PROTECTED]
To: phplist [EMAIL PROTECTED]
Sent: Thursday, April 29, 2004 10:12 AM
Subject: [PHP-DB] search engines


 Anyone out there know of a good tutorial on creating a php/mysql based
 search engine script?  I would like to write one for a small in-house
 application that I am running.
 thanks,
 DF
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] From mysql to mssql...

2004-04-29 Thread John W. Holmes
[EMAIL PROTECTED] wrote:
I've been given a one page project to do, that needs to add the 
contecnt of a form to an mssql database...

I'm fine with doing all the page, apart from talking to mssql... how 
drasitally does this differ from the standard mysql functions tha tI 
use..?
There's not much of a difference (with regards to the php functions). 
I'd recommend you get into the habit of using ADOdb or PEAR::DB so that 
even if you do switch databases like this, you still have a familiar 
syntax.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: From mysql to mssql...

2004-04-29 Thread Hans Lellelid
Hi Tristan,

Tristan Pretty wrote:
 However, I've been given a one page project to do, that needs to add the
 contecnt of a form to an mssql database...

 I'm fine with doing all the page, apart from talking to mssql... how
 drasitally does this differ from the standard mysql functions tha tI
 use..?

The quick answer is that you're in luck: the MSSQL API looks a lot like 
MySQL's PHP API.  For example, mysql_fetch_array() - mssql_fetch_array().

A practical word of advice, though:  use a database abstraction layer. 
There are a number out there that will make your life easier:  PEAR::DB, 
PEAR::MDB, ADOdb, Creole (PHP5).  Most (all?) of these support MS SQL 
Server and they will all make thing much easier -- especially if you 
ever decide to try to run that SQL Server app on MySQL.  I would 
recommend MDB (or MDB2) if you are using PHP4; ADOdb is fast, but if you 
care about source code quality and/or design you'll use PEAR.

One difference you'll probably discover, if you extend your app at all, 
is that there is no LIMIT in MS SQL Server.  To do paged queries is 
quite difficult -- and that's why using a db abstraction layer will help 
you out.

Other differences in the SQL / results are quite numerous.  Date/time 
formats look different (some abstraction layers will help with this). 
MySQL also allows for some pretty sloppy SQL, and MS SQL Server will 
complain when you try to do things like add aggegate functions to your 
SELECT() clause without having a GROUP BY clause.

 (Also, I nearly ahd to do it in asp... I'd never used it before, but 
after
 lookign at it, it made me damned happy that I use PHP.. way more user
 friendly!!)

At the risk of being stoned, I will say that I've had the opportunity to 
work with ASP.NET/C# and I absolutely love that famework (and the C# 
language).  It's a very well conceived answer to problem of OO n-tier 
web application development.  I love PHP and have been using it for many 
years, but I also love OO app architecture and even PHP5 really doesn't 
play in the same league as solutions like ASP.NET.  Classic ASP is a 
different story.

Cheers,
Hans
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Page cannot be displayed problems

2004-04-29 Thread Neil Smith [MVP, Digital media]
PUT is still used with great success by systems such as WebDav. I'd stick 
to GET or POST though in a web environment, as the server needs to be 
specially configured to accept PUT requests and there are certain security 
implications from allowing people to upload files using PUT.

Cheers - Neil.

At 10:43 29/04/2004 +, you wrote:
Message-ID: [EMAIL PROTECTED]
From: Uzi [EMAIL PROTECTED]
To: matthew perry [EMAIL PROTECTED], [EMAIL PROTECTED]
Date: Thu, 29 Apr 2004 09:13:40 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP-DB] Page cannot be displayed problems
form action=page2.php method=PUT ???
is that a new standard?



CaptionKit http://www.captionkit.com : Production tools
for accessible subtitled internet media, transcripts
and searchable video. Supports Real Player, Quicktime
and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Image / file uploader

2004-04-29 Thread Craig Hoffman
I have a script where it uploads a image to directory.   I have used 
the script several times and it works when I send the form to another 
page.  The problem is I have changed the form to submit to itself and I 
can't seem to get it to work.

echo ( form method='post' action='$_SERVER[PHP_SELF]'  
encType='multipart/form-data');

The thing is all my other fields update except for the image.  Further, 
the image does not even show up if I echo the query out.

UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', fav_race = 
'Fav Races - test', fav_train = 'Traing -test', photo_name = '' WHERE 
user_id = '1'	
Here is the code of the image uploader and my query, perhaps someone 
could take a look let me know what I'm missing.
Thanks - CH

input type='file' name='photo'

if($_POST[postback_bio])
	{
		
	include include/dbadmin.php;
			
	//image uploader
	$uploadpath = '/images/clients/';
	
	$source = $HTTP_POST_FILES['photo']['tmp_name'];
	$photo_name = $HTTP_POST_FILES['photo']['name'];
	$dest = '';
	if (($source != '')  ($source != '')) {
		$dest = $uploadpath.$photo_name;
		if ($dest = '') {
			if (move_uploaded_file($source, $dest)) {
echo (p id='message'Image and Bio has been successfully 
stored./p );
			} else {
echo (p id='message'Image could not be stored./p);
			}
		}
	} else {
		echo (p id='message'No new image supplied./p);
		$photo_name = $oldimage;
		}
		
		//declare varibles
		$user_id = $_POST[user_id];
		$name = $_POST[name];
		$bio = $_POST[bio];
		$goals = $_POST[goals];
		$fav_race = $_POST[fav_race];
		$fav_train = $_POST[fav_train];
		$photo = $_POST[photo_name];
		
	$query = UPDATE users SET bio = '$bio', goals = '$goals', fav_race = 
'$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'  
WHERE user_id = '$user_id';
	echo $query;
	$msg = span style='color:red' id='message'Could not update 
record/span;
	$result = mysql_query($query, $db);

	}


__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Daniel Clark
I think you want single quotes around PHP_SELF.

$_SERVER['PHP_SELF']

 I have a script where it uploads a image to directory.   I have used
 the script several times and it works when I send the form to another
 page.  The problem is I have changed the form to submit to itself and I
 can't seem to get it to work.

 echo ( form method='post' action='$_SERVER[PHP_SELF]'
 encType='multipart/form-data');

 The thing is all my other fields update except for the image.  Further,
 the image does not even show up if I echo the query out.

 UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', fav_race =
 'Fav Races - test', fav_train = 'Traing -test', photo_name = '' WHERE
 user_id = '1'
 Here is the code of the image uploader and my query, perhaps someone
 could take a look let me know what I'm missing.
 Thanks - CH

 input type='file' name='photo'

 if($_POST[postback_bio])
   {

   include include/dbadmin.php;

   //image uploader
   $uploadpath = '/images/clients/';

   $source = $HTTP_POST_FILES['photo']['tmp_name'];
   $photo_name = $HTTP_POST_FILES['photo']['name'];
   $dest = '';
   if (($source != '')  ($source != '')) {
   $dest = $uploadpath.$photo_name;
   if ($dest = '') {
   if (move_uploaded_file($source, $dest)) {
   echo (p id='message'Image and Bio has been 
 successfully
 stored./p );
   } else {
   echo (p id='message'Image could not be 
 stored./p);
   }
   }
   } else {
   echo (p id='message'No new image supplied./p);
   $photo_name = $oldimage;
   }

   //declare varibles
   $user_id = $_POST[user_id];
   $name = $_POST[name];
   $bio = $_POST[bio];
   $goals = $_POST[goals];
   $fav_race = $_POST[fav_race];
   $fav_train = $_POST[fav_train];
   $photo = $_POST[photo_name];

   $query = UPDATE users SET bio = '$bio', goals = '$goals', fav_race =
 '$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'
 WHERE user_id = '$user_id';
   echo $query;
   $msg = span style='color:red' id='message'Could not update
 record/span;
   $result = mysql_query($query, $db);

   }


 __
 Craig Hoffman - eClimb Media

 v: (847) 644 - 8914
 f: (847) 866 - 1946
 e: [EMAIL PROTECTED]
 w: www.eclimbmedia.com
 _

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Craig Hoffman
When I put single quotes in the PHP_SELF and I get this error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, 
expecting T_STRING or T_VARIABLE or T_NUM_STRING

and I can't use double quotes because its in an echo statement.  What 
am I missing?
echo (form method='post' action='$_SERVER['PHP_SELF']' 
encType='multipart/form-data'

Any more thoughts?
CH  
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
On Apr 29, 2004, at 6:49 PM, Daniel Clark wrote:
I think you want single quotes around PHP_SELF.

$_SERVER['PHP_SELF']

I have a script where it uploads a image to directory.   I have used
the script several times and it works when I send the form to another
page.  The problem is I have changed the form to submit to itself and 
I
can't seem to get it to work.

echo ( form method='post' action='$_SERVER[PHP_SELF]'
encType='multipart/form-data');
The thing is all my other fields update except for the image.  
Further,
the image does not even show up if I echo the query out.

UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', fav_race 
=
'Fav Races - test', fav_train = 'Traing -test', photo_name = '' WHERE
user_id = '1'
Here is the code of the image uploader and my query, perhaps someone
could take a look let me know what I'm missing.
Thanks - CH

input type='file' name='photo'

if($_POST[postback_bio])
{
	include include/dbadmin.php;

//image uploader
$uploadpath = '/images/clients/';
$source = $HTTP_POST_FILES['photo']['tmp_name'];
$photo_name = $HTTP_POST_FILES['photo']['name'];
$dest = '';
if (($source != '')  ($source != '')) {
$dest = $uploadpath.$photo_name;
if ($dest = '') {
if (move_uploaded_file($source, $dest)) {
echo (p id='message'Image and Bio has been 
successfully
stored./p );
} else {
echo (p id='message'Image could not be 
stored./p);
}
}
} else {
echo (p id='message'No new image supplied./p);
$photo_name = $oldimage;
}
//declare varibles
$user_id = $_POST[user_id];
$name = $_POST[name];
$bio = $_POST[bio];
$goals = $_POST[goals];
$fav_race = $_POST[fav_race];
$fav_train = $_POST[fav_train];
$photo = $_POST[photo_name];
$query = UPDATE users SET bio = '$bio', goals = '$goals', fav_race =
'$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'
WHERE user_id = '$user_id';
echo $query;
$msg = span style='color:red' id='message'Could not update
record/span;
$result = mysql_query($query, $db);
	}

__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Daniel Clark
Change to double quotes for the HTML portion.

action=\$_SERVER['PHP_SELF']\

 When I put single quotes in the PHP_SELF and I get this error:
 Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
 expecting T_STRING or T_VARIABLE or T_NUM_STRING

 and I can't use double quotes because its in an echo statement.  What
 am I missing?
 echo (form method='post' action='$_SERVER['PHP_SELF']'
 encType='multipart/form-data'

 Any more thoughts?
 CH
 __
 Craig Hoffman - eClimb Media

 v: (847) 644 - 8914
 f: (847) 866 - 1946
 e: [EMAIL PROTECTED]
 w: www.eclimbmedia.com
 _
 On Apr 29, 2004, at 6:49 PM, Daniel Clark wrote:

 I think you want single quotes around PHP_SELF.

 $_SERVER['PHP_SELF']

 I have a script where it uploads a image to directory.   I have used
 the script several times and it works when I send the form to another
 page.  The problem is I have changed the form to submit to itself and
 I
 can't seem to get it to work.

 echo ( form method='post' action='$_SERVER[PHP_SELF]'
 encType='multipart/form-data');

 The thing is all my other fields update except for the image.
 Further,
 the image does not even show up if I echo the query out.

 UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', fav_race
 =
 'Fav Races - test', fav_train = 'Traing -test', photo_name = '' WHERE
 user_id = '1'
 Here is the code of the image uploader and my query, perhaps someone
 could take a look let me know what I'm missing.
 Thanks - CH

 input type='file' name='photo'

 if($_POST[postback_bio])
 {

 include include/dbadmin.php;

 //image uploader
 $uploadpath = '/images/clients/';

 $source = $HTTP_POST_FILES['photo']['tmp_name'];
 $photo_name = $HTTP_POST_FILES['photo']['name'];
 $dest = '';
 if (($source != '')  ($source != '')) {
 $dest = $uploadpath.$photo_name;
 if ($dest = '') {
 if (move_uploaded_file($source, $dest)) {
 echo (p id='message'Image and Bio has been 
 successfully
 stored./p );
 } else {
 echo (p id='message'Image could not be 
 stored./p);
 }
 }
 } else {
 echo (p id='message'No new image supplied./p);
 $photo_name = $oldimage;
 }

 //declare varibles
 $user_id = $_POST[user_id];
 $name = $_POST[name];
 $bio = $_POST[bio];
 $goals = $_POST[goals];
 $fav_race = $_POST[fav_race];
 $fav_train = $_POST[fav_train];
 $photo = $_POST[photo_name];

 $query = UPDATE users SET bio = '$bio', goals = '$goals', fav_race =
 '$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'
 WHERE user_id = '$user_id';
 echo $query;
 $msg = span style='color:red' id='message'Could not update
 record/span;
 $result = mysql_query($query, $db);

 }


 __
 Craig Hoffman - eClimb Media

 v: (847) 644 - 8914
 f: (847) 866 - 1946
 e: [EMAIL PROTECTED]
 w: www.eclimbmedia.com
 _

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Micah Stevens

Do this:

 echo ( form method='post' action='.$_SERVER[PHP_SELF].'
 encType='multipart/form-data');

PHP doesn't handle array's well in echo statements, so you have to stop the 
echo, concat the array, and then continue the echo.

-Micah

On Thursday 29 April 2004 04:46 pm, Craig Hoffman wrote:
 I have a script where it uploads a image to directory.   I have used
 the script several times and it works when I send the form to another
 page.  The problem is I have changed the form to submit to itself and I
 can't seem to get it to work.

 echo ( form method='post' action='$_SERVER[PHP_SELF]'
 encType='multipart/form-data');

 The thing is all my other fields update except for the image.  Further,
 the image does not even show up if I echo the query out.

 UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', fav_race =
 'Fav Races - test', fav_train = 'Traing -test', photo_name = '' WHERE
 user_id = '1'
 Here is the code of the image uploader and my query, perhaps someone
 could take a look let me know what I'm missing.
 Thanks - CH

 input type='file' name='photo'

 if($_POST[postback_bio])
   {

   include include/dbadmin.php;

   //image uploader
   $uploadpath = '/images/clients/';

   $source = $HTTP_POST_FILES['photo']['tmp_name'];
   $photo_name = $HTTP_POST_FILES['photo']['name'];
   $dest = '';
   if (($source != '')  ($source != '')) {
   $dest = $uploadpath.$photo_name;
   if ($dest = '') {
   if (move_uploaded_file($source, $dest)) {
   echo (p id='message'Image and Bio has been 
 successfully
 stored./p );
   } else {
   echo (p id='message'Image could not be 
 stored./p);
   }
   }
   } else {
   echo (p id='message'No new image supplied./p);
   $photo_name = $oldimage;
   }

   //declare varibles
   $user_id = $_POST[user_id];
   $name = $_POST[name];
   $bio = $_POST[bio];
   $goals = $_POST[goals];
   $fav_race = $_POST[fav_race];
   $fav_train = $_POST[fav_train];
   $photo = $_POST[photo_name];

   $query = UPDATE users SET bio = '$bio', goals = '$goals', fav_race =
 '$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'
 WHERE user_id = '$user_id';
   echo $query;
   $msg = span style='color:red' id='message'Could not update
 record/span;
   $result = mysql_query($query, $db);

   }


 __
 Craig Hoffman - eClimb Media

 v: (847) 644 - 8914
 f: (847) 866 - 1946
 e: [EMAIL PROTECTED]
 w: www.eclimbmedia.com
 _

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Craig Hoffman
Sorry to be a pest but I tried that.  It giving me the same error.
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
On Apr 29, 2004, at 7:10 PM, Daniel Clark wrote:
Change to double quotes for the HTML portion.

action=\$_SERVER['PHP_SELF']\

When I put single quotes in the PHP_SELF and I get this error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING
and I can't use double quotes because its in an echo statement.  What
am I missing?
echo (form method='post' action='$_SERVER['PHP_SELF']'
encType='multipart/form-data'
Any more thoughts?
CH
__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
On Apr 29, 2004, at 6:49 PM, Daniel Clark wrote:
I think you want single quotes around PHP_SELF.

$_SERVER['PHP_SELF']

I have a script where it uploads a image to directory.   I have used
the script several times and it works when I send the form to 
another
page.  The problem is I have changed the form to submit to itself 
and
I
can't seem to get it to work.

echo ( form method='post' action='$_SERVER[PHP_SELF]'
encType='multipart/form-data');
The thing is all my other fields update except for the image.
Further,
the image does not even show up if I echo the query out.
UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', 
fav_race
=
'Fav Races - test', fav_train = 'Traing -test', photo_name = '' 
WHERE
user_id = '1'
Here is the code of the image uploader and my query, perhaps someone
could take a look let me know what I'm missing.
Thanks - CH

input type='file' name='photo'

if($_POST[postback_bio])
{
	include include/dbadmin.php;

//image uploader
$uploadpath = '/images/clients/';
$source = $HTTP_POST_FILES['photo']['tmp_name'];
$photo_name = $HTTP_POST_FILES['photo']['name'];
$dest = '';
if (($source != '')  ($source != '')) {
$dest = $uploadpath.$photo_name;
if ($dest = '') {
if (move_uploaded_file($source, $dest)) {
echo (p id='message'Image and Bio has been 
successfully
stored./p );
} else {
echo (p id='message'Image could not be 
stored./p);
}
}
} else {
echo (p id='message'No new image supplied./p);
$photo_name = $oldimage;
}
//declare varibles
$user_id = $_POST[user_id];
$name = $_POST[name];
$bio = $_POST[bio];
$goals = $_POST[goals];
$fav_race = $_POST[fav_race];
$fav_train = $_POST[fav_train];
$photo = $_POST[photo_name];
	$query = UPDATE users SET bio = '$bio', goals = '$goals', 
fav_race =
'$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'
WHERE user_id = '$user_id';
	echo $query;
	$msg = span style='color:red' id='message'Could not update
record/span;
	$result = mysql_query($query, $db);

	}

__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Bruno Ferreira
Craig Hoffman wrote:

Sorry to be a pest but I tried that.  It giving me the same error.
__
Change to double quotes for the HTML portion.

action=\$_SERVER['PHP_SELF']\

   You'll find that the ultimate correct form is echo etcetc 
action=\$_SERVER[PHP_SELF]\ etcetc;

   When you're using an associative array inside a string, you don't 
need to put quotes refer to its textual index.

   Bruno Ferreira
---
[This E-mail scanned for viruses by Declude Virus]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Craig Hoffman
Fellows, thanks for helping.  But still no luck. The error is gone, but 
the image / file is still not showing up in the query.  What else I can 
provide to help trouble shoot this?

echo (form method='post' action='.$_SERVER[PHP_SELF].' 
encType='multipart/form-data');	
__
Craig Hoffman - eClimb Media

v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
On Apr 29, 2004, at 7:32 PM, Micah Stevens wrote:
Do this:

 echo ( form method='post' action='.$_SERVER[PHP_SELF].'
 encType='multipart/form-data');
PHP doesn't handle array's well in echo statements, so you have to 
stop the
echo, concat the array, and then continue the echo.

-Micah

On Thursday 29 April 2004 04:46 pm, Craig Hoffman wrote:
I have a script where it uploads a image to directory.   I have used
the script several times and it works when I send the form to another
page.  The problem is I have changed the form to submit to itself and 
I
can't seem to get it to work.

echo ( form method='post' action='$_SERVER[PHP_SELF]'
encType='multipart/form-data');
The thing is all my other fields update except for the image.  
Further,
the image does not even show up if I echo the query out.

UPDATE users SET bio = 'Bio - Test', goals = 'Goals - Test', fav_race 
=
'Fav Races - test', fav_train = 'Traing -test', photo_name = '' WHERE
user_id = '1'
Here is the code of the image uploader and my query, perhaps someone
could take a look let me know what I'm missing.
Thanks - CH

input type='file' name='photo'

if($_POST[postback_bio])
{
	include include/dbadmin.php;

//image uploader
$uploadpath = '/images/clients/';
$source = $HTTP_POST_FILES['photo']['tmp_name'];
$photo_name = $HTTP_POST_FILES['photo']['name'];
$dest = '';
if (($source != '')  ($source != '')) {
$dest = $uploadpath.$photo_name;
if ($dest = '') {
if (move_uploaded_file($source, $dest)) {
echo (p id='message'Image and Bio has been 
successfully
stored./p );
} else {
echo (p id='message'Image could not be 
stored./p);
}
}
} else {
echo (p id='message'No new image supplied./p);
$photo_name = $oldimage;
}
//declare varibles
$user_id = $_POST[user_id];
$name = $_POST[name];
$bio = $_POST[bio];
$goals = $_POST[goals];
$fav_race = $_POST[fav_race];
$fav_train = $_POST[fav_train];
$photo = $_POST[photo_name];
$query = UPDATE users SET bio = '$bio', goals = '$goals', fav_race =
'$fav_race', fav_train = '$fav_train', photo_name = '$photo_name'
WHERE user_id = '$user_id';
echo $query;
$msg = span style='color:red' id='message'Could not update
record/span;
$result = mysql_query($query, $db);
	}

__
Craig Hoffman - eClimb Media
v: (847) 644 - 8914
f: (847) 866 - 1946
e: [EMAIL PROTECTED]
w: www.eclimbmedia.com
_
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Page cannot be displayed continues

2004-04-29 Thread matthew perry
Everyone,

Thank you very much for your advice about not using PUT.  I will use 
GET or POST from now on.

I am, however, failing to understand how to use headers to change pages 
instead of meta tags.

After checking if the user has logged in correctly I do this:

if ($loginGood){
   echo 'meta http-equiv=refresh content=0;URL=welcome.php';
}
else {
echo 'meta http-equiv=refresh content=0;URL=loginerror.php';
 }
How can I use a header like the following one to do change pages based 
on variable input?

Thank you for your time and patience,
- Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php