php, html, css
Started by damage jackal, Feb 06 2008 10:00 PM
18 replies to this topic
#1
Posted 06 February 2008 - 10:00 PM
right now im newbie in php and still learning so im making this thread for peeps like me to ask questions about those langs
#2
Posted 08 February 2008 - 09:28 PM
The forum at http://www.sitepoint.com is great for asking web design and PHP-related questions, and their articles are useful too. And, of course, PHP.net's documentation manual is very useful for learning PHP.
#3
Posted 08 February 2008 - 09:33 PM
i know php.net and some others (using google ) but sometimes i can adapt it :\
#4 Guest_Kat_*
Posted 12 February 2008 - 11:38 AM
Oh, I will love this section, since I might have to alter a website soon enough and I have no fucking clue what I am doing...
#6
Posted 22 February 2008 - 05:07 PM
how to make pop up window with php?
also, i have file upload scrpipt with MAX_FILE_SIZE = 1MB
but files over that easly get uploaded, i was told that this must be configured with php.ini file, but i dont have such file? any way around that?
also, i have file upload scrpipt with MAX_FILE_SIZE = 1MB
but files over that easly get uploaded, i was told that this must be configured with php.ini file, but i dont have such file? any way around that?
#7
Posted 22 February 2008 - 08:26 PM
You have to use Javascript to make a pop-up window because PHP is a server-side language--in other words, nothing can be done unless a request is sent to the server. Javascript, being a client-side scripting language, can open up a new window with specified dimensions. You just have to keep in mind some people, albeit very few, don't have Javascript enabled. Just search Google for some tutorials on it.
MAX_FILE_SIZE is easily bypassed and not really a good way to control file uploads--it can easily be circumvented by malicious users and can't be more than the allowed value in php.ini. The php.ini setting is fail-safe, but can only be changed by the server administrator. One thing you can do is allow the file to be uploaded, then check the filesize and delete it if it's over a certain limit instead of copying it from the temporary directory. This isn't good if server-space is an issue, but it's sort-of a workaround.
MAX_FILE_SIZE is easily bypassed and not really a good way to control file uploads--it can easily be circumvented by malicious users and can't be more than the allowed value in php.ini. The php.ini setting is fail-safe, but can only be changed by the server administrator. One thing you can do is allow the file to be uploaded, then check the filesize and delete it if it's over a certain limit instead of copying it from the temporary directory. This isn't good if server-space is an issue, but it's sort-of a workaround.
#8
Posted 23 February 2008 - 10:04 AM
so i'll remove MAX_FILE_SIZE attribute then, since it doesn't do anything.
I'm not sure how to make that with javascript, but i've another idea: right now i have action="<?php echo $_SERVER['PHP_SELF']; ?>" in <form> of the upload script. if i make action="newpage.php", how to echo text in that newpage?
I'm not sure how to make that with javascript, but i've another idea: right now i have action="<?php echo $_SERVER['PHP_SELF']; ?>" in <form> of the upload script. if i make action="newpage.php", how to echo text in that newpage?
#9
Posted 23 February 2008 - 09:46 PM
You would echo stuff or display HTML the same as on any other page, but if you want it to be the action script you'll probably want to use something like this:
What will make it the action script is simply doing something with $_REQUEST (takes the place of either $_POST or $_GET) or $_FILES (for uploaded files).
if (isset($_REQUEST['keyname'])) { // do something } else { echo "Nothing was sent!"; }
What will make it the action script is simply doing something with $_REQUEST (takes the place of either $_POST or $_GET) or $_FILES (for uploaded files).
#10
Posted 23 February 2008 - 10:20 PM
erm, where i put this? and what is keyname?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users