Re: [PHP] Help with header function

2002-06-11 Thread Shane Kelly

LOL...thanks ed...figured it out last night...
don't need to do a file_exists

since i capture file_name in my db...I do a query before the insert to see
if the file_name entered in the form, matches any of the file_names stored
in mySQL.  if the count of the record set  0 then the file exists, and
redirect using header: Location...etc,etc.

If count=0 then insert form contents into docuemnt and copy file to folder.

Thanks

Shane
Ed Lazor [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 LOL  Yea, it's always much easier if we have actual code to work from
rather
 than taking guesses in the dark.

 -Original Message-
 Why do I get the feeling I'm playing that mind bender game where you
have
 to guess the right combination within so many turns?  LOL



 This message is intended for the sole use of the individual and entity to
 whom it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law.  If you are
 not the intended addressee, nor authorized to receive for the intended
 addressee, you are hereby notified that you may not use, copy, disclose or
 distribute to anyone the message or any information contained in the
 message.  If you have received this message in error, please immediately
 advise the sender by reply email and delete the message.  Thank you very
 much.




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




[PHP] Re: mysql problems, need help quick

2002-06-11 Thread Shane Kelly

not on auto increment...thats the point!
why would you need to get the #6 back anyway...

this is the fundementals of database theory... chances are the database is
using this autoincrement field as the PRIMARY KEY...in which case no
duplicates are allowed..

In terms of records...your id#7 has become record #6.

I can't think of any reason why loosing the #6 should affect anything you
want to do.

XXx
Hawk [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm filling a database with info, and I'm using id as identifiers in the
 list, the id is auto increment, and I deleted one entry, now I have a hole
 in the database, is there any way to fix this?
 lets say I have
 1
 2
 3
 4
 5
 6
 And I deleted 6
 Now it looks like
 1
 2
 3
 4
 5
 7
 8
 9 and so on

 is there somewhere the next number is located ?






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




[PHP] Re: Newbie needs some help picking a php editor.

2002-06-11 Thread Shane Kelly

Hi Al...

I use Macromedia Dreamweaver UltraDev with PHAkt plugin (you'll have to add
it from the dreamweaver ultradev extensions @ www.macromedia.com/exchange

Macromedia UltraDev is available for 30 day free trial at their site

it has brilliant php support..you barely have to know a stitch of code, but
it helps.

There are also other PHP extensions available at macromedia exchange.

check out www.php.net
they talk about other possible resources...but I love ultradev.





Al [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I spent a good bit of time looking at editors to help me prepare and
 modify php scripts.  I've found it very time consuming to evaluate them.

 In general, I've found you have to download, install and play with them
 some just to determine if they fit your needs.  And I know from
 experience, often programs only show their deficiencies after you've
 used them a bit.

 And, I've found many that claim php editing; but they really aren't
 anything but a simple plain text editor.

 My needs are modest.  I'm well versed with HTML, css, etc.  And have
 done a bit of customizing scripts.

 For now, I mostly need an editor that will:
   Help me keep the syntax correct.
   Provide a list of functions, etc. to pick from.
   Upload my script files via ftp.
   Have the usual search/replace across files

 Would be nice if it:
   Had a project feature
   Could run a script I'm working on locally with its includes, etc. on
 my remote host.

 Right now I'm looking at php Coder Pro; phpEdit and UltraEdit.

 Can anyone comment on these?  And please suggest any others.

 Thanks.




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




[PHP] Re: multi-line textfields don't post

2002-06-10 Thread Shane Kelly

Do you mean the data doesn't transfer over to your database?


Phil Schwarzmann [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Whenever I use a mult-line textfield, the data inside doesn't transfer
 over.  But single-line textfields work just fine.

 how do i fix this?




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




[PHP] Help with header function

2002-06-10 Thread Shane Kelly

I'm creating an upload form for users to upload files to my server.  but I
don't want them to overwrite existing files if they try to upload using the
same file name...

THE FOLLOWING SCRIPT WORKS PERFECTLY

if (file_exists(uploads/documents/.$file_name)==TRUE) {
 die (File already exists);
 }
 else {
 copy($file,uploads/documents/.$file_name); }

BUT  I WOULD RATHER HAVE IT REDIRECT THEM TO ANOTHER PAGE USING

if (file_exists(uploads/documents/.$file_name)==TRUE) {
 header(Location:http://www.mysite.com/file_exists.php;);
 }
 else {
 copy($file,uploads/documents/.$file_name); }

THIS SCRIPT DOESN'T WORK...DOES ANYONE KNOW WHY???

Thanks

Shane
[EMAIL PROTECTED]



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




Re: [PHP] Help with header function

2002-06-10 Thread Shane Kelly

I don't get an error message...but the page doesn't automatically forward to
the redirected url.





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