Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Yep, CSS/HTML problem.. not php
  2. an easier route would be MySQL to CSV, as excel can open CSV's if you google that it should find a few examples
  3. i would probably change $ext = substr($filename, strrpos($filename, '.') + 1); to $ext = strtolower(substr($filename, strrpos($filename, '.') + 1)); but the rest looks fine
  4. Erm.. not 100% sure of the "problem"..
  5. 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
  6. theirs a ton of problems in that script!.. do PNG files work!?
  7. 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
  8. 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
  9. erm.. no if you echo after the header.. it will rediect before the display..
  10. use either $Requirements or $requirements, not both change $Requirements $Requirements=stripslashes($_POST['Requirements']); to $requirements=stripslashes($_POST['Requirements']); that should do it
  11. Nope thats will fail.. nothing can be sent to the screen before a header
  12. i think you mean this: $Requirements=stripslashes($_POST['Requirements']);
  13. More like your learning fast young grass hopper
  14. 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); ?>
  15. Yep, Select case is VB for switch
  16. 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; } } ?>
  17. as jesirose says your missing the name
  18. 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
  19. change $File = file('attachments/test.txt'); to $File = file('attachments/test.txt'); $File = implode('', $File ); or file_get_contents($File);
  20. 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
  21. Coolie, i gave you a few options to play with, hoped something would prove useful
  22. 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");//
  23. 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; ?>
  24. use $matches = preg_match("/^[0-9]+$/", $val);
×
×
  • 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.