Jump to content

Don Jajo

  • Posts

  • Joined

  • Last visited

About Don Jajo

  • Birthday 02/15/1995

Contact Methods

  • Website URL

Profile Information

  • Location
    Abia, Nigeria

Don Jajo's Achievements


Newbie (1/7)



  1. header("Content-Disposition: attachment; filename="".$download_file.""");
  2. Using PHP >= 4 use this - http://php.net/manual/en/function.crypt.php
  3. ...also, use pathinfo () function to get file extension, i might have a period in my file name before the extension and that gets you an error http://www.w3schools.com/php/func_filesystem_pathinfo.asp
  4. I suggest you paste the content of file_get_html() function
  5. You actually want mail to get sent when every validation requirements are made, learn how to use the "elseif" statement then the mail () function then stays at the last "else" statement which means all requirements are met - http://php.net/manual/en/control-structures.elseif.php
  6. try <?php$con = mysqli_connect(db_details) or die(mysqli_error($con));?>
  7. well, in this instance i use something like uniqid() function which is generated based on microtime - http://www.w3schools.com/php/func_misc_uniqid.asp Then do something like md5(uniqid()) or sha1 I don't think its gonna clash since time changes every second
  8. Because you initiated MySQL connection with MySQLi procedural method and you tried executing the query with OOP method that is why it keeps dying Let your $con be <?php $con = new MySQLi('db_host','db_dbuser','db_pwd','db_name');?> or let your query execution be procedural <?phpmysqli_query($con,$SQL) or die('error');?>
  9. Or set this in the directory .htaccess file DirectoryIndex anotherlink.php
  10. Don Jajo

    \r\n not working

    Coding an email body I don't use n or nr. I just hit the enter key it will also reflect in the mail
  11. Am doubting you read that article $_SERVER['SCRIPT_NAME']
  12. Thanks to justsomeguy, I just learnt new thing now Now the PHP_SELF fetch URL from the address bar, if am using something like <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"><input type="text" name="" /></form> and in the address bar I add this (assuming my file is test.php) test.php/" <script>alert('hello');</script> Check the ouput now
  13. ye, trim() is the best function to handle spaces in the beginning of a string
  14. The above code can work quite well since the content is of each line
  • Create New...