-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Erm.. Well Done.. i think lol ???
-
change the $filename = "http://tzfiles.com/users/$user/$img_id.jpg"; to $filename = "users/$user/$img_id.jpg"; for your one i needed the "http://tzfiles.com/" as its running from my server.
-
flashchat http://www.tufat.com/script2.htm was the chat room heres the webcam addon http://www.virtualjam.net/addons/
-
[SOLVED] Data Field with Currency Not Sorting Accurately
MadTechie replied to phpQuestioner's topic in PHP Coding Help
Remember Click Solved! Bottom Left of this page -
[SOLVED] Data Field with Currency Not Sorting Accurately
MadTechie replied to phpQuestioner's topic in PHP Coding Help
Sorting fields is based on the field type so if the field type is a int type (ie medium) the sort should be fine, if your field type is a string ie char then sorting number will look kinda messy ie -
Quick Question On PHP Register and Login Scripts - MYSQL Error
MadTechie replied to VeronMan's topic in PHP Coding Help
oh boy.. you know i'll ask again were you supplied a SQL file ? -
hows this <?php $sentance1 = "the black cat crossed the street"; $s = explode(" ",$sentance1); shuffle($s); $new_sentance1 = implode(" ", $s); echo $sentance1; echo "<br />is now<br />"; echo $new_sentance1; ?>
-
ok you have a problem in the db.php then, only works with jpg's but its only a test as well.. here's my link www.madtechiesupport.com/test3.php?user=ryan&image_id=img_23&percent=.75 heres the code <?php function getext() { return ".jpg"; } // The file session_start(); $img_id = $_GET['image_id']; $user = $_GET['user']; /*include"db.php"; $img = mysql_query("SELECT * FROM files where file_id='$img_id'")or die(mysql_error()); $imgs = mysql_fetch_array($img); $filename = "users/".$_SESSION['user']."/".$imgs['file_name'];*/ $filename = "http://tzfiles.com/users/$user/$img_id.jpg"; $percent = $_GET['percent']; switch($percent){ case ".25"; $percent = .25; break; case ".50"; $percent = .50; break; case ".75"; $percent = .75; break; case "1"; $percent = 1; break; default: $size = GetImageSize($filename); $width = $size[0]; if($width < 200){ $percent = 1; }else{ $percent = .5; } break; } // Content type if(getext($filename)=='.jpg'){ header('Content-type: image/jpeg'); }elseif(getext($filename)=='.gif'){ header('Content-type: image/gif'); }elseif(getext($filename)=='.png'){ header('Content-type: image/png'); } // Get new sizes list($width, $height) = getimagesize($filename); $newwidth = $width * $percent; $newheight = $height * $percent; // Load $thumb = imagecreatetruecolor($newwidth, $newheight); if(getext($filename)=='.jpg'){ $source = imagecreatefromjpeg($filename); }elseif(getext($filename)=='.gif'){ $source = imagecreatefromgif($filename); }elseif(getext($filename)=='.png'){ $source = imagecreatefrompng($filename); $alpha = imagealphablending($source, true); imagesavealpha($alpha, true); } // Resize imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); // Output if(getext($filename)=='.jpg'){ imagejpeg($thumb); }elseif(getext($filename)=='.gif'){ imagegif($thumb); }elseif(getext($filename)=='.png'){ imagepng($thumb); } ?>
-
Quick Question On PHP Register and Login Scripts - MYSQL Error
MadTechie replied to VeronMan's topic in PHP Coding Help
need to add the field "id" in codes -
Noobie question.. retrieving data from database stuff
MadTechie replied to potnoodle's topic in PHP Coding Help
<?php $get_information = mysql_query("SELECT * FROM information WHERE category = '1'") or die(mysql_error()); while($information = @mysql_fetch_assoc($get_information)) { $information_title = $information['title']; $information_content = substr($information['content'], 0, 500) ; echo "<b>" . $information_title . "</b><br />" . $information_content . "<hr>" ; } ?> will do the 500 characters -
Hummmmmm OK hate me but still please try this add this <?php function getext() { return ".jpg"; } ?> and test a jpg file from my server (linking to yours without the database of course) http://www.madtechiesupport.com/test3.php?user=ryan&image_id=img_23&percent=.75
-
as a guess i would say line 73 $query = "SELECT * FROM user_ids WHERE username='$username'"; is this SQL statment valid ?
-
ok well i think you have a GD problem, try <?php // Load $thumb = @imagecreatetruecolor($newwidth, $newheight) or die("Cannot Initialize new GD image stream") //<---changed ?> do a phpinfo(); and check it
-
lol, love it thats one way i'll have a play see how deep my hole currently is (not sure how much needs updating) thanx kenrbnsn
-
[SOLVED] i need w/ implementing the php
MadTechie replied to shortybookit's topic in PHP Coding Help
OK if you are changing the banner images then you need to edit this part 67 lines down <table cellspacing="0" width="95%"> <tr> <td height="100" colspan="5" align="left" valign="top"><div align="left"><img src="http://www.cometosandiego.com/eric/application/graphics/header-left.jpg" width="453" height="105"><img src="http://www.tookout.com/eric/application/graphics/header-img.jpg" width="453" height="105"></div></td> added a banner above (22.jpg) <table cellspacing="0" width="95%"> <tr> <td height="100" colspan="5" align="left" valign="top"><div align="left"><img src="22.jpg"<br> <img src="http://www.cometosandiego.com/eric/application/graphics/header-left.jpg" width="453" height="105"><img src="http://www.tookout.com/eric/application/graphics/header-img.jpg" width="453" height="105"></div></td></tr> -
changing the <?php $filename = "users/".$_SESSION['user']."/".$imgs['file_name']; ?> so is the full path to the image or even add a $filename below it with a full known path just to force it to a image.
-
Correction kenrbnsn missed a " <?php $q = "INSERT INTO vbb_members(username,password,email,reg_date,mem_no,perm) values('$username', '$password', '$email', '$reg_date', '$mem_no', '$perm')"; $rs = mysql_query($q) or die ("Error in query:<pre>$q</pre><br>".mysql_error()); ?>
-
i am not sure but you can do it in flash, i had a live chat created in flash and had a webcam mod added to it, will dig out the link if you want!
-
[SOLVED] i need w/ implementing the php
MadTechie replied to shortybookit's topic in PHP Coding Help
thats just some basic HTML, got something for us to see ? (maybe one of your attempts) -
Whats $filename returning? <?php $filename = "users/".$_SESSION['user']."/".$imgs['file_name']; echo $filename; //<--Add die; //<--Add ?>
-
Problem is only the my_foo[] would be returned.. when i'll be expecting my.foo[]
-
urlencode doesn't solve the dot (.) problem, anyone have another idea ?
-
store the offline var their then.. just add a field