-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
make sure you are using session_start(); before using the sessions
-
this post may be related it s banner rotator
-
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.
-
looks like here $msg['message']=wordwrap($msg['message'], 75, echo span style="color:blue"<gt>; . $msg['login'] . " (" . $msg['itstime'] . ")span style="color:navy"; } } what did your last slave die of ?
-
[SOLVED] Upload form and Upload script on same page
MadTechie replied to Scripts's topic in PHP Coding Help
erm.. what! your need to access the page to upload a file! i guess a if( isset($_POST['formelement']) ) would work -
can you do the following please print_r($_GET); and post the results, as what clown[NOR] is saying is 100% correct
-
what are the 3 queries ? you could try to build them into one but without knowing the schema its impossible hard to say
-
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']}"
-
Knew it didn't look right!!
-
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= ......)
-
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
-
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
-
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"> ?
-
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,
-
post the menu script please first 10lines should be ok
-
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
-
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
-
what!!.. thats makes no sense!
-
please click solved as a side note lookup switch
-
$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
-
check the link to the image
-
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 />'; } } ?>
-
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 ?>
-
try <?php $image = "images/image.jpg"; $size = getimagesize($image); $NewH = 250; $height =$NewH; $width = ((100/$size[0]) * $NewH); ?>
-
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!