Re: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Tony72284

   After I upload it was takes me back to the Form. And ignores 
$replay_file...
   And I don't know why.



Re: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Jason Wong
On Friday 01 November 2002 17:00, [EMAIL PROTECTED] wrote:
After I upload it was takes me back to the Form. And ignores
 $replay_file...
And I don't know why.

1) Any error messages?

2) What exactly do you mean by: ignores $replay_file...

Try some basic debugging techniques like printing the names  values of 
important variables at strategic places in your code to verify that they 
contain what you expect them to contain.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
One man's Mede is another man's Persian.
-- George M. Cohan
*/


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




Re: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Tony72284

   After I submit the file, it goes back to the form, even though in the 
script, it says to go to the database and move the uploaded file to a new 
DIR.

   It ignores it as if the file wasn't uploaded. 

   As for printing out the variables. All my important variables are 
$HTTP_POST_FILES and those are all null.



Re: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Jason Wong
On Friday 01 November 2002 17:45, [EMAIL PROTECTED] wrote:
After I submit the file, it goes back to the form, even though in
 the script, it says to go to the database and move the uploaded file to a
 new DIR.

It ignores it as if the file wasn't uploaded.

As for printing out the variables. All my important variables are
 $HTTP_POST_FILES and those are all null.

manual  Variables  Variable scope

And also if you're using a version of php newer than 4.0.6 then you should be 
using $_FILES instead of $HTTP_POST_FILES.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
What we Are is God's gift to us.
What we Become is our gift to God.
*/


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




Re: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Mohammad Saad
check the values of these variables

$rTemp = $HTTP_POST_FILES['replay_file']['tmp_name'];
$rName = $HTTP_POST_FILES['replay_file']['name'];
$rSize = $HTTP_POST_FILES['replay_file']['size'];

// Define Replay Upload DIR and FILE name
$rFile = $db_nextid._.$HTTP_POST_FILES['replay_file']['name'];
$rLoc = files/war3-replays/$rFile;

they should contain some value , one more thing , mite be the case that
$HTTP_POST_FILES['replay_file']['tmp_name'] should be
$HTTP_POST_FILES['REPLAY_FILE']['TMP_NAME]

do one thing, print_r($HTTP_POST_FILES); this should show you what that
array contains
Good Luck

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 2:45 PM
Subject: Re: [PHP-DB] Am I doing This Right?



After I submit the file, it goes back to the form, even though in
the
 script, it says to go to the database and move the uploaded file to a new
 DIR.

It ignores it as if the file wasn't uploaded.

As for printing out the variables. All my important variables are
 $HTTP_POST_FILES and those are all null.



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




RE: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Snijders, Mark
or just do

phpinfo(); en check all the vars

cause in the latest php versions it could be that you have to use
$_POST[.. etc..

___ 

Mark Snijders, Developer 
Atos Origin 
Groenewoudeseweg 1, Room VN-515 
5621 BA  Eindhoven, The Netherlands 
*   : [EMAIL PROTECTED] 
*:+31 (0)40 - 2785992 (tel) 
* : +31 (0)40 - 2788729 (fax) 

The information in this mail is intended only for use of the individual or
entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
Access to this mail by anyone else than the addressee is unauthorized. If
you are not the intended recipient, any disclosure, copying, distribution or
any action taken omitted to be taken in reliance of it, is prohibited and
may be unlawful.



-Original Message-
From: Mohammad Saad [mailto:m_saad;khi.comsats.net.pk]
Sent: vrijdag 1 november 2002 11:11
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Am I doing This Right?


check the values of these variables

$rTemp = $HTTP_POST_FILES['replay_file']['tmp_name'];
$rName = $HTTP_POST_FILES['replay_file']['name'];
$rSize = $HTTP_POST_FILES['replay_file']['size'];

// Define Replay Upload DIR and FILE name
$rFile = $db_nextid._.$HTTP_POST_FILES['replay_file']['name'];
$rLoc = files/war3-replays/$rFile;

they should contain some value , one more thing , mite be the case that
$HTTP_POST_FILES['replay_file']['tmp_name'] should be
$HTTP_POST_FILES['REPLAY_FILE']['TMP_NAME]

do one thing, print_r($HTTP_POST_FILES); this should show you what that
array contains
Good Luck

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 2:45 PM
Subject: Re: [PHP-DB] Am I doing This Right?



After I submit the file, it goes back to the form, even though in
the
 script, it says to go to the database and move the uploaded file to a new
 DIR.

It ignores it as if the file wasn't uploaded.

As for printing out the variables. All my important variables are
 $HTTP_POST_FILES and those are all null.



-- 
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] Am I doing This Right?

2002-11-01 Thread 1LT John W. Holmes
No, you're doing it wrong.

---John Holmes...

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 01, 2002 2:05 AM
Subject: [PHP-DB] Am I doing This Right?




 ?php

 function war3_replays_submit() {

 if ( isset($replay_file) ) {
 $htmlHead = ;
 pgHead('Shadow Legion :: Warcraft III Replays', $htmlHead);

 // Get Current DB Entrys
 $rDB = mysql_query(select * from war3_replays where 1);

 // Select The Next Entry ID For Newly Uploaded Replay
 $db_count = sizeof($rDB);
 $db_nextid = $db_count + 1;

 // Define Date Dubmitted
 $rDate = date(m-d-y);

 // Define HTTP_POST_FILES Variables
 $rTemp = $HTTP_POST_FILES['replay_file']['tmp_name'];
 $rName = $HTTP_POST_FILES['replay_file']['name'];
 $rSize = $HTTP_POST_FILES['replay_file']['size'];

 // Define Replay Upload DIR and FILE name
 $rFile = $db_nextid._.$HTTP_POST_FILES['replay_file']['name'];
 $rLoc = files/war3-replays/$rFile;

 // DB Query For Inserting File Information into DB
 // DB Layout [ id | user | date | url | size | type | replaytitle
|
 version | replayname | downloads ]
 $q1 = INSERT INTO war3_replays VALUES ( $db_nextid,
 '$replay_submitter', '$rDate', '$rLoc', '$rSize', '$replay_type',
 '$replay_version', '$replay_mapname', 0 ) ;

 // Check If The File Was Moved And Renamed Properly
 if ( @
 !move_uploaded_file($HTTP_POST_FILES['replay_file']['tmp_name'],
$rLoc) ) {
 print 'centerSorry, file not correctly uploaded.';
 pgMid();
 nav('war3-replays-submit');
 pgFoot();
 exit();

 // If File Was Moved And Renames Properly
 } else {

 // Check If The Database Information Was Inserted Properly
 if ( !mysql_query($q1) ) {
 print 'Failed to insert the Replay Information into the
 database.';
 pgMid();
 nav('war3-replays-submit');
 pgFoot();
 exit();

 // If The DB Was Updated Properly... Make The User Happy
!!!
 } else {

 print 'Thank you for submitting your replay
 '.$replay_submitter.'!br
 The view replay will be up within the next few
days.pThanks
 again!/p';

 }
 }
 } else {
 $htmlHead = 'script Language=Javascript type=text/javascript
 src=/files/upload.js/script';
 pgHead('Shadow Legion :: Warcraft 3 Replays',$htmlHead);
 print 'pbr/p
 centerUpload Your Replay
 form enctype=multipart/form-data
 action=?q=war3-replays-submit method=post
 table border=1 cellpadding=0 cellspacing=0 width=400
 borderColor=#99
 tr
 td valign=topcenterfont size=-1Replay File
 /font:/center/td
 td valign=topinput name=replay_file
type=file
 /td
 /tr
 tr
 td valign=topcenterfont size=-1Replay Title
 /font/center/td
 td valign=topinput type=text maxlength=50
 name=replay_title/td
 /tr
 tr
 td valign=topcenterfont
size=-1Category/font:
 /center/td
 td valign=topselect name=replay_typeoption
 value=-Type.../optionoption value=soloSolo/optionoption
 value=ffaFree For All/optionoption value=teamTeam/optionoption
 value=umsUse Map Settings/option/select/td
 /tr
 tr
 td valign=topcenterfont size=-1Map
Name/font:
 /center/td
 td valign=topinput type=text maxlength=50
 size=20 name=replay_mapname/td
 /tr
 tr
 td valign=topcenterfont size=-1War3
Versionbr
 When Replay Recorded:/font/center/td
 td valign=topselect name=replay_version
 id=replay_versionoption value=-Version.../optionoption
value=1.03
 v1.03/optionoption value=1.02v1.02/optionoption
value=1.01v1.01
 /optionoption value=1.00v1.00/option/select/td
 /tr
 tr
 td valign=topcenterfont
size=-1Member/font:
 /center/td
 td valign=topinput type=text maxlength=20
 name=replay_submitter id=replay_submitter/td
 /tr
 tr
 td valign=top colspan=2centertextarea
 name=replay_disc cols=40 rows=7/textarea/center/td
 /tr
 tr
 td valign=top colspan=2centerinput
type=button
 onClick=javascript:uploadCheck(); value=Upload nbsp; input
 type=reset value=Start Over/center/td
 /tr
 /table
 /form
 /center
 pbr/p
 hr width=75% size=1 color=#99
 p/p';
 pgMid

Re: [PHP-DB] Am I doing This Right?

2002-11-01 Thread Tony72284

   The server is 4.0.6 ...And I tried to get the owner to update it. He 
said its not nesscarry.



[PHP-DB] Am I doing This Right?

2002-10-31 Thread Tony72284


?php

function war3_replays_submit() {

if ( isset($replay_file) ) {
$htmlHead = ;
pgHead('Shadow Legion :: Warcraft III Replays', $htmlHead);

// Get Current DB Entrys
$rDB = mysql_query(select * from war3_replays where 1);

// Select The Next Entry ID For Newly Uploaded Replay
$db_count = sizeof($rDB);
$db_nextid = $db_count + 1;

// Define Date Dubmitted
$rDate = date(m-d-y);

// Define HTTP_POST_FILES Variables
$rTemp = $HTTP_POST_FILES['replay_file']['tmp_name'];
$rName = $HTTP_POST_FILES['replay_file']['name'];
$rSize = $HTTP_POST_FILES['replay_file']['size'];

// Define Replay Upload DIR and FILE name
$rFile = $db_nextid._.$HTTP_POST_FILES['replay_file']['name'];
$rLoc = files/war3-replays/$rFile;

// DB Query For Inserting File Information into DB
// DB Layout [ id | user | date | url | size | type | replaytitle | 
version | replayname | downloads ]
$q1 = INSERT INTO war3_replays VALUES ( $db_nextid, 
'$replay_submitter', '$rDate', '$rLoc', '$rSize', '$replay_type', 
'$replay_version', '$replay_mapname', 0 ) ;

// Check If The File Was Moved And Renamed Properly
if (  
!move_uploaded_file($HTTP_POST_FILES['replay_file']['tmp_name'], $rLoc) ) {
print 'centerSorry, file not correctly uploaded.';
pgMid();
nav('war3-replays-submit');
pgFoot();
exit();

// If File Was Moved And Renames Properly
} else {

// Check If The Database Information Was Inserted Properly
if ( !mysql_query($q1) ) {
print 'Failed to insert the Replay Information into the 
database.';
pgMid();
nav('war3-replays-submit');
pgFoot();
exit();

// If The DB Was Updated Properly... Make The User Happy !!!
} else {

print 'Thank you for submitting your replay 
'.$replay_submitter.'!br
The view replay will be up within the next few days.pThanks 
again!/p';

}
}
} else {
$htmlHead = 'script Language=Javascript type=text/javascript 
src=/files/upload.js/script';
pgHead('Shadow Legion :: Warcraft 3 Replays',$htmlHead);
print 'pbr/p
centerUpload Your Replay
form enctype=multipart/form-data 
action=?q=war3-replays-submit method=post
table border=1 cellpadding=0 cellspacing=0 width=400 
borderColor=#99
tr
td valign=topcenterfont size=-1Replay File
/font:/center/td
td valign=topinput name=replay_file type=file
/td
/tr
tr
td valign=topcenterfont size=-1Replay Title
/font/center/td
td valign=topinput type=text maxlength=50 
name=replay_title/td
/tr
tr
td valign=topcenterfont size=-1Category/font:
/center/td
td valign=topselect name=replay_typeoption 
value=-Type.../optionoption value=soloSolo/optionoption 
value=ffaFree For All/optionoption value=teamTeam/optionoption 
value=umsUse Map Settings/option/select/td
/tr
tr
td valign=topcenterfont size=-1Map Name/font:
/center/td
td valign=topinput type=text maxlength=50 
size=20 name=replay_mapname/td
/tr
tr
td valign=topcenterfont size=-1War3 Versionbr
When Replay Recorded:/font/center/td
td valign=topselect name=replay_version 
id=replay_versionoption value=-Version.../optionoption value=1.03
v1.03/optionoption value=1.02v1.02/optionoption value=1.01v1.01
/optionoption value=1.00v1.00/option/select/td
/tr
tr
td valign=topcenterfont size=-1Member/font:
/center/td
td valign=topinput type=text maxlength=20 
name=replay_submitter id=replay_submitter/td
/tr
tr
td valign=top colspan=2centertextarea 
name=replay_disc cols=40 rows=7/textarea/center/td
/tr
tr
td valign=top colspan=2centerinput type=button 
onClick=javascript:uploadCheck(); value=Upload nbsp; input 
type=reset value=Start Over/center/td
/tr
/table
/form
/center
pbr/p
hr width=75% size=1 color=#99
p/p';
pgMid();
nav('war3-replays-submit');
pgFoot();
}
}
?



Re: [PHP-DB] Am I doing This Right?

2002-10-31 Thread Jason Wong
On Friday 01 November 2002 15:05, [EMAIL PROTECTED] wrote:
 ?php

 function war3_replays_submit() {

 if ( isset($replay_file) ) {

Doing what right? Where/what is the problem?

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
See - the thing is - I'm an absolutist.  I mean, kind of ... in a way ...
*/


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