Jump to content

phpSensei

Members
  • Posts

    2,838
  • Joined

  • Last visited

    Never

About phpSensei

  • Birthday 06/12/1992

Contact Methods

  • MSN
    phpsensei@hotmail.com
  • Website URL
    http://www.indesigner.ca

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

phpSensei's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. I always thought this script explained it pretty well, from PHP security Consortium <?php define('SALT_LENGTH', 9); function generateHash($plainText, $salt = null) { if ($salt === null) { $salt = substr(md5(uniqid(rand(), true)), 0, SALT_LENGTH); } else { $salt = substr($salt, 0, SALT_LENGTH); } return $salt . sha1($salt . $plainText); } ?>
  2. We all began somewhere, no one is born with ultimate knowledge of PHP. Your doing great btw, don't worry about it. Keep pushing yourself, never stay in your comfort zone, and always set a challenge for yourself in programming and you'll learn over time.
  3. this. and i think the OP is wondering how the ORDER of the if/else will work.. PHPchick, If you simply do if($var ==""){ print "please enter the var 1 field" ; } if($var2 ==""){ print "please enter the var 2 field"; } if($var3 ==""){ print "please enter the var 3 field"; } Output Please enter the var 1 field Please enter the var 2 field Please enter the var 3 field it will display all 3 errors.. although if you do this method if($var == ""){ print "please enter the var 1 field"; }elseif($var2 ==""){ print "please enter the var 2 field"; } Then it will go in sequence. It will run through the entire if/elseif script, and if the one of the conditions are met, it will print that error... It will keep printing 1 error everytime as long as the conditions are met until there are no more errors...
  4. Cool, you know what, I really love the array_map function, I just came back from a competition in skills and technology, it saved me alot of time, but this is kind of off topic
  5. You are ignoring the solutions provided. Your code is all over the place, the "!" exclamation mark means the opposite of the function result. IF the database does not connect, then DO NOT run the while loop. Use your frickin brackets... and this ($all = 0){ completely useless What is that function even supose to return? Why is your max_item and db globalized? Wheres $result coming from? Some parsing problems here you should fix echo "<TR><TD><ahref=\"{$_SERVER['PHP_SELF']}" . "?action = show&id={$row['id']}\<Comments</a>($comment_row[0]}</TD></TR>\n)";
  6. is_numeric performs faster results than ctype.. but i guess ctype checks if its purely digits only.
  7. Yeah, but if you dig a little deeper you will get some more problems such as if they close their browser and don't bother to even click cancel. Heres what I would do... If a user decides to upload an attachement I will store in a database table, and each attachement has a POST ID which is assigned to it. When they click submit, you can have boolean field which confirms if the post has been submitted or not, if it has then make sure you update the attachement in the table and set the attachement_submitted field to true. You can also delete the attachement if they click cancel, and run a cron job to everyday at a certain time which will check for all attachement who have the attachement_submitted field set to false.
  8. Your still uploading content to the folder. OP, I think the "Cancel" / "Delete" button can trigger a function that will check if there were any attachments made, find them, and delete them. simple.
  9. [quote author=utdfederation link=topic=106377.msg969399#msg969399 date=1219182379] hello all the story behind my username...hmmm well to be honest it is a dead give away really. utdfederation i chose because i am a fan of startrek  united federation of planets so there you go utd (united) federation just decided to keep the planets part off but i think it is original. utdfed [/quote] I think I am the only coder in the world that has never seen more than 1 episode of star trek, or watched star wars. Sometimes I try watching it but it gives me nightmares and my mom thinks its porn. I seriously should get a geekier name! Maybe like PHPgeek or FourEyesSensei [quote author=baronsamedi link=topic=106377.msg969496#msg969496 date=1219191562] baron samedi is the voodoo doll i worship [/quote] Who made the doll? Some factory. Who made the factory? Humans. Who made humans? God. worship god. :P I know ur kidding.
  10. IiISenseiIiI SICK! story behind username: It was a stormy day and I was drinking a redbull.... My wife was having an afair and.... I got pissed so I smashed my keyboard and my computer typed IiIEnterYourNameHereAndStopSmashingMeGAWDIiI edit: I need to get a life.
  11. My new name will be XxPHPsensexXPoniesxOxOxOxOxOxOxo0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXxxxXXxxxx
  12. [quote author=gijew link=topic=106377.msg921334#msg921334 date=1214279447] Mine was my nickname when I was in the army. I would always make jokes that I was too fragile to do (x) as I was in the Infantry because I was Jewish so one day a friend of mine starts calling me, G.I. Jew - The Greatest American Hebrew. It stuck. [/quote] HAHAHA
  13. You're name those have a sexy and creative feel to it.
  14. I just finished watching a kung fu movie that night, and i called me PHPsensei. No one can mess with the sensei...... no one. ever. no. stop. no one. just nobody.... not even chuck norris. Okay! maybe he can, but no one else.  8) edit: The user above me, you are hopeless, I thought your name was Hopeless Sex, because having sex was hopeless?
×
×
  • 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.