Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. make sure you are using session_start(); before using the sessions
  2. this post may be related it s banner rotator
  3. pointless this post is going no where. OK MD5 AKA (Message-Digest algorithm 5) you can NOT just use UNMD5 it doesn't work like that.. brute forcer takes time but will work time would be about 3 weeks using 6000 computers the best example ican give is if you is a if a document was a person then the MD5 would be the finger print, once you have the finger print you can match it to a person but not rebuild that person from the finger print... advice: Theirs a number of MD5 reverse lookup databases, which make it easy to decrypt password hashed with plain MD5. To prevent such attacks you can add a salt to your passwords before hashing them. Also, it is a good idea to apply the hashing function (MD5 in this case) more than onceā€”see key strengthening. It increases the time needed to encode a password and discourages dictionary attacks.
  4. looks like here $msg['message']=wordwrap($msg['message'], 75, echo span style="color:blue"<gt>; . $msg['login'] . &quot; (&quot; . $msg['itstime'] . &quot;)span style="color:navy"; } } what did your last slave die of ?
  5. erm.. what! your need to access the page to upload a file! i guess a if( isset($_POST['formelement']) ) would work
  6. can you do the following please print_r($_GET); and post the results, as what clown[NOR] is saying is 100% correct
  7. what are the 3 queries ? you could try to build them into one but without knowing the schema its impossible hard to say
  8. you really should just pass the record ID and do another "Select ... where ID = $ID" you can pass it via GET ie profile.php?id=1243 then "Select ... where ID = {$_GET['ID']}"
  9. Knew it didn't look right!!
  10. your setting both height and width the same try this <?php $image = "/business_images/stuufloadtsd.jpg"; $size = getimagesize($image); $NewHW = 250; if($size[0] > $size[1]) { $height =$NewHW ; $width = ((100/$size[0]) * $NewHW ); }else{ $width =$NewHW ; $height = ((100/$size[1]) * $NewHW ); } echo "<img src='$image' width='$width' height='$height'>" ?> or post the code that set the image up (aka the part that prints <img scr= ......)
  11. switch the link to the image to a php script with an image header and then on preset dates the script can point to different files see below EDIT: call this image.php and replace your banner.jpg with image.php <?php function LoadJpeg($imgname) { $im = @imagecreatefromjpeg($imgname); /* Attempt to open */ if (!$im) { /* See if it failed */ $im = imagecreatetruecolor(150, 30); /* Create a black image */ $bgc = imagecolorallocate($im, 255, 255, 255); $tc = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 150, 30, $bgc); /* Output an errmsg */ imagestring($im, 1, 5, 5, "Error loading $imgname", $tc); } return $im; } header("Content-Type: image/jpeg"); $today = getdate(); switch($today['mon']) { default: case 1: $img = LoadJpeg("Jan.image.jpg"); break; case 2: $img = LoadJpeg("Feb.image.jpg"); break; case 12: $img = LoadJpeg("xmas.image.jpg"); break; } imagejpeg($img); ?> its a start **UNTESTED i guess this is free
  12. what about this if i did it correctly it should shrink the image to fit in a box of 250x250 (proportianal) <?php $image = "images/image.jpg"; $size = getimagesize($image); $NewHW = 250; if($size[0] > $size[1]) { $height =$NewHW ; $width = ((100/$size[0]) * $NewHW ); }else{ $width =$NewHW ; $height = ((100/$size[1]) * $NewHW ); } ?> just incase the height is too big and the width is ok *untested
  13. wrong section, thats a html issule check the CSS also whats with the <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251"> ?
  14. it would be something like this SELECT country, count(*) as Total Group By country the 2 field you pull will be Total = number of entrys per country country = the counter your get a row per country as a note i am drained and didn't test the above,
  15. post the menu script please first 10lines should be ok
  16. No the error IS as follows SO, your the image $image = "images/image.jpg"; doesn't exist.. thus no sizes are pulled from $size = getimagesize($image); read the error again.. you know it makes sense
  17. your need to do this via Javascript or flash, after a quick google, i found this http://www.wimpyplayer.com/products/mp3/javascript_mp3_player.html
  18. what!!.. thats makes no sense!
  19. please click solved as a side note lookup switch
  20. $pass = "a passsword"; $HASH = md5($pass); $HASH goes into the database now //to check the password is correct you would so thingt like this $passFromUser ="wrongpassword" //compare $HASHFromUser = md5($passFromUser); //to HASH stored in the database. so you compare the results of the MD5 to each other.. i hope that makes sense
  21. check the link to the image
  22. what a about this <?php function getStaff() { c2db(); $query = "SELECT * FROM `staff` ORDER BY `alevel` DESC"; $result = mysql_query($query); if (!$result) { die(mysql_error()); } while ($dbField = mysql_fetch_assoc($result)) { if($dbField['alevel'] != $lastalevel) { $lastalevel = $dbField['alevel']; echo "<B>$lastalevel</B><br>"; } echo $dbField['dname'].' || '.$dbField['country'].'<br />'; } } ?>
  23. change <?php $title="SELECT title FROM $tableposts WHERE id='$viewtopic'"; $resultoftitle=mysql_query($title); // end mysql queries ?> to <?php $title="SELECT title FROM $tableposts WHERE id='$viewtopic'"; $resultoftitle=mysql_query($title); $GetTitle =mysql_fetch_array($resultoftitle); $resultoftitle = $GetTitle['title']; // end mysql queries ?>
  24. try <?php $image = "images/image.jpg"; $size = getimagesize($image); $NewH = 250; $height =$NewH; $width = ((100/$size[0]) * $NewH); ?>
  25. i have to ask but what are you trying to do? if your trying to execute two file can it execute simultaneously, then your going to be searching for a long time, maybe Zend Optimizer would be the way to go!
×
×
  • 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.