[SOLVED] Upload and View Form/Script...thingie

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the first one only, the second one just normal quotes.
v3xtra
Forum Newbie
Posts: 14
Joined: Wed Jan 05, 2005 4:56 pm

Post by v3xtra »

Works, thank you VERY much feyd, you were a big help, sorry for your time spent with me! It works fine and if I have any problems on anything else, I hope I'm welcome to come back and ask! (With the exception that I search before. Of course! ;) )

Thanks again!

-v3x
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

of course you're welcome back.. we do prefer that people search before they ask, but it's understandable to not know what to search for. So we don't mind tooo much, unless it gets asked too often. ;)
v3xtra
Forum Newbie
Posts: 14
Joined: Wed Jan 05, 2005 4:56 pm

Post by v3xtra »

Ok, just one last quick question I want to understand. If this is my form:

Code: Select all

<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr><form enctype="multipart/form-data" action="upload.php" method="post">
    <input type="hidden" name="MAX_FILE_SIZE" value="900000" />
    <td align="right">Author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input type="text" size="15" name="author" /></td></tr>
<tr><td align="right">Title&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input type="text" size="15" name="title" /></td></tr>
<tr><td align="right">AMX Version (0.9.9, 0.9.8, etc.)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input type="text" size="15" name="amxv" /></td></tr>
<tr><td align="right">Description of Plugin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><textarea name="desc" rows="5" cols="40"></textarea></td></tr>
<tr><td align="right">Choose a file to upload&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="userfile" type="file" /></td></tr>
<tr><td align="right"><input type="submit" value="Upload File" /></td><td align="left"><input type="reset" value"Reset" /></td></tr>
</form>
</table>
(Sorry about the table crap...too lazy to take it out)....but the point is...this line:

Code: Select all

<input type="hidden" name="MAX_FILE_SIZE" value="900000" />
Will using that overwrite or overRIDE the MAX_FILE_SIZE in php.ini or no? I currently don't have a problem with the upload sizes, but I just want to find out if it does or not. Thanks. ;)

-v3x

(And sorry about the recent attack, if it was DDoS, alot of forums around have been getting hit as well, AMX/AMXX forums both were hit by it and were down for 1-2 days each. Sorry about all that, but the new forum theme is nice! :) )
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I am unsure if it is affected by the php.ini setting. I would imagine the php.ini setting is the maximum size allowed across the board, and the size set in the form is there to tell php to limit the size of the file being submitted to the lesser of the two.

You can always try it with a small file. Set php.ini to a low number, and the form to a 100K more, then try to post something that's between the two.
v3xtra
Forum Newbie
Posts: 14
Joined: Wed Jan 05, 2005 4:56 pm

Post by v3xtra »

Will do and will get back to ya, and see what it does. Thanks!

-v3x

[EDIT] Uploaded a file 10254 kb big, with a max of 1k, so I'll take a guess that it works! :D Thanks feyd!
Post Reply