-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Yep, CSS/HTML problem.. not php
-
an easier route would be MySQL to CSV, as excel can open CSV's if you google that it should find a few examples
-
[SOLVED] Handling Images .... OS file or MySQL storage
MadTechie replied to PhpTim's topic in PHP Coding Help
i would probably change $ext = substr($filename, strrpos($filename, '.') + 1); to $ext = strtolower(substr($filename, strrpos($filename, '.') + 1)); but the rest looks fine -
change <?php echo "<p>Name: $Name Media: $Media Colors: $Colors etc to <?php extract($_POST); //add this echo "<p>Name: $Name Media: $Media Colors: $Colors etc a bettet solution is to add $Name = $_POST['Name']; etc etc but in the script above extract will work
-
theirs a ton of problems in that script!.. do PNG files work!?
-
output_buffering is the size of the buffer for ob_start.. so no it will not work! you might need to read that i quoted a statement not code the statement also included "it will", thus i corrected you. PS. you should see some of the code i posted for people.. kinda surprised they tried it! lol
-
[SOLVED] Handling Images .... OS file or MySQL storage
MadTechie replied to PhpTim's topic in PHP Coding Help
you would have a php script that acts as the image, you would then pass the image id to that file ie <img src='imager.php?id=12'> that script will search the database and extract that blog and using the header and imagejpg funcitons that script will become the image thats a quick summery -
erm.. no if you echo after the header.. it will rediect before the display..
-
[SOLVED] HELP needed adding a menu to my current php code.
MadTechie replied to leet8845's topic in PHP Coding Help
use either $Requirements or $requirements, not both change $Requirements $Requirements=stripslashes($_POST['Requirements']); to $requirements=stripslashes($_POST['Requirements']); that should do it -
Nope thats will fail.. nothing can be sent to the screen before a header
-
[SOLVED] HELP needed adding a menu to my current php code.
MadTechie replied to leet8845's topic in PHP Coding Help
i think you mean this: $Requirements=stripslashes($_POST['Requirements']); -
[SOLVED] Handling Images .... OS file or MySQL storage
MadTechie replied to PhpTim's topic in PHP Coding Help
More like your learning fast young grass hopper -
Ahh ok, this will work.. (kinda forgot the alphachannel) header('content-type: image/jpeg'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefromjpeg($_GET['src']); imagealphablending($image, true); $size = getimagesize($_GET['src']); $dest_x = $size[0] - $watermark_width - 5; $dest_y = $size[1] - $watermark_height - 5; imagecopy($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height); imagejpeg($image); imagedestroy($image); imagedestroy($watermark); ?>
-
Yep, Select case is VB for switch
-
thats fine.. but you don't even have any name set! EDIT: try this <td><input type="submit" name="submit" value="Add Entry"></td> <td><input type="submit" name="submit" value="Edit/Delete Entry"></td> <? if(isset($_POST['submit'])) { switch($_POST['submit']) { case "Add Entry": echo "Add"; break; case "Edit/Delete Entry": echo "delete"; break; } } ?>
-
Hi, pls tell me what functions/package to use for the following ?
MadTechie replied to jd2007's topic in PHP Coding Help
read the rules use google -
as jesirose says your missing the name
-
try this <input name="password1" type="password" value="{$_POST['password1']}" /> <input name="password2" type="password" value="{$_POST['password2']}" /> but many forms do clear the password.. the reason is that if you use the above the password is displayed on the page (via view source) so can be cached
-
change $File = file('attachments/test.txt'); to $File = file('attachments/test.txt'); $File = implode('', $File ); or file_get_contents($File);
-
Getting external data from a logged in user
MadTechie replied to FalcorTheDog's topic in PHP Coding Help
the problem is YOUR pc is logged in but when use you fopen the server opens the file not your PC so the server would been to be logged in, maybe have a read of cURL -
[SOLVED] Forming a SQL statement from multiple checkboxes
MadTechie replied to gamefreak13's topic in PHP Coding Help
Coolie, i gave you a few options to play with, hoped something would prove useful -
what about this keep the //extract raw and save to file, this result file looks good /* $handle = fopen("c://temp//output//".$file_name, 'w'); fwrite($handle, $file); fclose($handle); */ then use readfile($filename); instead of echo'ing the data.., then after the steaming unlink($filename) as for the header("Content-Type: application/octet-stream");// try this instead header("Content-Type: application/force-download");// NOTE: header("Content-Type: application/octet-stream");// will probably fail in IE IEs version is header("Content-Type: application/octetstream");//
-
[SOLVED] Forming a SQL statement from multiple checkboxes
MadTechie replied to gamefreak13's topic in PHP Coding Help
what about this, (something to play with) i hope it makes sense <form method="post" enctype="application/x-www-form-urlencoded" name="myform"> Bike<br /> On road <input name="bike" type="radio" value="on" checked="checked" /> <br /> Off road <input name="bike" type="radio" value="off" /> <br /> <br /> CAR<br /> <input type="checkbox" name="car[]" value="on" /> on road <input type="checkbox" name="car[]" value="off" /> off road <br /> <br /> <input name="submit" type="submit" value="ok" /> </form> <?php $car = implode(",", $_POST['car']); echo "bike:"; echo $_POST['bike']; echo "<br /><br />"; echo "car:"; echo $car; ?> -
[SOLVED] Checking if a variable is an integer?
MadTechie replied to Warptweet's topic in PHP Coding Help
use $matches = preg_match("/^[0-9]+$/", $val);