Jump to content

vin_akleh

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by vin_akleh

  1. if that is what you mean <?php //i have tried it here 2 "set_time_limit(300);" if(isset($_POST['sb'])) { set_time_limit(300); $path = "images"; $file = $_FILES['filetoupload']['name']; move_uploaded_file($_FILES['filetoupload']['tmp_name'], "$path/$file"); } ?> that didnt work and yes it gives no errors when i upload a pdf file it takes some seconds to reload the page (after upload), but when i try to upload an mp3 it takes smaller time to reload the page.
  2. this code works file on images, pdf and shortcut files but not mp3!!! why?? any one knows <html> <body> <form action="" method="POST" enctype="multipart/form-data"> Browse file to upload <input type="file" name="filetoupload" id="filetoupload"><br/> <input type="submit" name="sb" id="sb" value="Upload now"> </form> <?php if(isset($_POST['sb'])) { $path = "images"; $file = $_FILES['filetoupload']['name']; move_uploaded_file($_FILES['filetoupload']['tmp_name'], "$path/$file"); } ?> </html> </body> thanks in advanced
  3. ow ya i forgot about the if (isset($_REQUEST["page"])) { $page=$_REQUEST['page']; $fn=basename($page); if(file_exists("$path/$fn.php")) include"$path/$fn.php"; } if (isset($_REQUEST["logout"])) { $logout=$_REQUEST['logout']; $fn=basename($page); if(file_exists("$path/$fn.php")) include"$path/$fn.php"; }
  4. just to make sure, this is it if (isset($_REQUEST["page"])) { $page=$_REQUEST['page']; fn=basename($page) if(file_exists("$path/$fn.php")) include"$path/$fn.php"; } if (isset($_REQUEST["logout"])) { $logout=$_REQUEST['logout']; fn=basename($page) if(file_exists("$path/$fn.php")) include"$path/$fn.php"; } ?????????????????????
  5. is this the solution?? of course the $path should be preseted if (isset($_REQUEST["page"])) { $page=$_REQUEST['page']; if(file_exists("$path/$page.php")) include "*/".$_REQUEST["page"].".php"; } if (isset($_REQUEST["logout"])) { $logout=$_REQUEST['logout']; if(file_exists("$path/$logout.php")) include "logout.php"; }
  6. what is CMS??? what your saying is that if i check it's path that will be the solution and nothing else will be needed?? or is there something else that needs to be checked??
  7. if (isset($_REQUEST["page"])) { include $_REQUEST["page"].".php"; } if (isset($_REQUEST["logout"])) { include "logout.php"; } well is it? if so what is the solution? thanks
  8. only 2 question 1- is it better to use a boolean variable or is there any flows in my way of coding, that i must consider using another way? 2- what does the request_once() does???
  9. does this have any security flows??!! should i use any other better way can any one forge there cookies to get admin privilege
  10. i have a web page that is not editable by the client (read only) when the admin login he can change the text in the page i know that i have to use if condition, and i already have all what i need for the admin login, but i don't know what is the condition if (admin not loged in) { echo'<p>some text in here</p>'; } else { echo'<form method="post" action=" '.$_SERVER['PHP_SELF'];.' "> enter text here:<textarea name="content" cols="60" rows="10"></textarea> <br> <input type="submit" value="save"> <input type="reset" value="clear"><br/> </form>'; }
  11. i want to give the "img" a value that i retrieved from sql: "'.$id.'" echo '<a ref:"image.php?img=1"><img="'.$img.'"/></a>'; what is the syntax for that thanks for any help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.