Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. query should be like this $query = "UPDATE users SET pass='SHA('$p')' WHERE username='{$_SESSION['username']}'";
  2. u need to make some thing like this echo ("<br><a href = 'index.php?rss=$url'>$name_re</a>"); and to fetch these values u need to write some $rss=$_GET['rss'];
  3. one small issue i have i need to call an exe from my present system but that is not working.. can any one help me hw to open an application.. <?php function callTool ($path,$file) { chdir($path); $call = $path.$file; pclose(popen('start /b '.$call.'', 'r')); } // -- Call tool1 ----- $location = "C:\\Program Files\\fabFORCE"; $filename = "\\DBDesigner4.exe"; callTool($location,$filename); //echo $location.$filename; ?> this is the code i am using..
  4. if u want to see the files on the sevrer then it can be done like this <?php $command1 = 'D:\test123\1.bat'; exec($command1,$output); print_r($output); ?> bat file should be @echo off dir d:\ >much.txt type much.txt exit
  5. not the php tell me wt is the version of mysql?
  6. i gave full permissions to the file and also i am administrator in my machine and i have full previlages. still could not able to figure out why is that not working.. :-\
  7. echo $ava_strQuery and try running it manually in the mysql. the on duplicate has been introduced in Mysql 4.1 hope you are using the updated version only.. refer to this documentation for referral. http://www.mysqlperformanceblog.com/2006/05/29/insert-on-duplicate-key-update-and-summary-counters/
  8. hai jay no luck though.. <?php $command = 'cd "D:\test123"'; echo exec($command); $command1 = 'note.bat'; exec($command1); ?> <INPUT type="submit" value="Run Automation" onclick="<?php echo exec($command1); ?>" /> nothing just happens.. note.bat is what u gave me if i run that it works though..
  9. ur auth id is a primary key so try entering a different number and try that.. i think that was the problem..
  10. i have been trying this but it does not seem to work.. any help would be appreciated. i know i need to start a new thread for this.. but i stopped trying this so just wanted to see how to execute the commands of windows. one more thing is i gave full permissions to all users to the windows/system32 folder.. but nothing works though.. <?php $command1 = 'notepad.exe'; exec($command1); ?>
  11. actually the exec() doesnot execute the windows commands though..
  12. Change your @$avatar_Mime_Type to some thing like this @$avatar_Mime_Type=strtolower(substr($_FILES['txt_file']['name'],strrpos($_FILES['txt_file']['name'],'.')+1)); now change the condition like this if( $avatar_Mime_Type != "gif" OR $avatar_Mime_Type != "jpeg" OR $avatar_Mime_Type != "png" ) for your reference i am uploading one script i have done some time back.. u need to have an sql like this insert into `filetype` (`type_name`) values('doc'); insert into `filetype` (`type_name`) values('gif'); insert into `filetype` (`type_name`) values('jpg'); insert into `filetype` (`type_name`) values('pdf'); insert into `filetype` (`type_name`) values('png'); [attachment deleted by admin]
  13. this could be the issue if( $avatar_Mime_Type != "image/gif" AND $avatar_Mime_Type != "image/jpeg" AND $avatar_Mime_Type != "image/png" ) it is not supposed to be and over there it should be or condition, an image cannot be of all the three types..
  14. curl can do that .... though there are some problems in that one.. check this code for example.. <?php $userAgent = "IE 7 - Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"; $target_url = "http://google.com"; $ch = curl_init(); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); curl_setopt($ch, CURLOPT_URL,$target_url); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($ch, CURLOPT_TIMEOUT, 10); $html = curl_exec($ch); if (!$html) { echo " cURL error number:" .curl_errno($ch); echo " cURL error:" . curl_error($ch); exit; } else { var_dump($html); } ?>
  15. there is a small problem in uploading though.. if some one else tries to store the file with same name it will either replace the existing file or it will not upload based on your settings.. so try using a random name for the file name..
  16. while storing store it with a randomly generated file name u can get the uploaded type i mean extension of the file like this $uploaded_type=strtolower(substr($_FILES['file']['name'],strrpos($_FILES['file']['name'],'.')+1)); so while storing in the database store it with this new name and then use the option like this insert into files(name,time_nw) values('blah blah.$uploaded_type', now()); what this would do is it will store the present time of the server.. so while fetching the records u can do some thing like this.. select * from files order by time_nw desc i hope this will do that
  17. that would eat up ur mysql space and also it is not such a good idea to store such large files in Mysql.. store it some where and give a reference of that point in mysql.. i think that would do.
  18. I dont think this is at all possible..with php..
  19. are u using the root access. if it is a local machine then try using the sqlyog to change the password..
  20. Have u checked this out http://www.phpmyadmin.net/home_page/downloads.php provided it allows you to connect to the database without the Cpanel
  21. run these commands in the phpmyadmin USE mysql; UPDATE USER SET PASSWORD='' WHERE USER='root'; i hope this will work..
  22. u can do some thing like this echo " <a href="<name_of_php>.php?name=$row['mem_name']" title="<title">anything</a>" after that u can call these values in name_of_php file as $id=$_GET['name'];
×
×
  • 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.