Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. in firefox you can see the url that it's using you can copy and paste that in a browser window to see if you're getting any output from the php page. If all you get is a white screen it's possible that you've got an error in your php code. You can paste this ini_set('display_errors',1); error_reporting(E_ALL); at the top of your php page then refresh to see if there's any error on your php page.
  2. Not a question for the php board but... like this if(a==1) { document.getElementById("destination").innerHTML="<select name='combo2' value='0'><option>option 1 a</option><option>option 1b</option><option>option 1c</option></select>"; }
  3. This is a bad idea and a huge security hole. This used to be done automatically. It was called register_globals. They turned it off by default for a reason. You could duplicate it with this. foreach($_GET as $k=>$v) { $$k=$v; }
  4. or this almost the same just another way of writing it. <input type='radio' name='Sex' style='width:16px; border:0;' value='Male' <?php echo ($row['Sex']=='Male')?"checked='checked'":"";?>'/>Male <input type='radio' name='Sex' '<?php echo ($row['Sex']=='Female')?"checked='checked'":"";?>' style='width:16px; border:0;' 'value='Female' />Female
  5. because it's in double quotes so it doesn't parse it. Try "Hello ".$Name
  6. you're doing an update with the syntax for insert, and you'll want to escape the data loop { foreach($data as $k=>$v) { $data[$k]=mysql_real_escape_string($v); } $import="UPDATE isc_products set prodavailability='".$data[1]."',prodinvtrack='".$data[2]."', prodcurrentinv='".$data[3]."' where vendor_id='".$data[0]."'"; mysql_query($import) or die(mysql_error()); }
  7. nm I was wrong
  8. I've used this before http://code.google.com/p/dompdf/ but you'll want to run your html through a validator first. It's a little picky about compliance.
  9. what you're looking for is $_SERVER['HTTP_REFERER'];
  10. nm
  11. You can't. Not with the way you're doing it. You're creating a text file that excel happens to be able to open. You'd have to create an excel compatible file to be able to do formatting. I used pears spreadsheet writer http://pear.php.net/package/Spreadsheet_Excel_Writer /but it only creates files compatible up to excel 2003. If you need to auto sort and other features from later than 2003 there's phpexcel http://phpexcel.codeplex.com/
  12. you forgot a parenthesis while ($row2 = mysql_fetch_row($result2){ should be while ($row2 = mysql_fetch_row($result2)) {
  13. I forgot to mention this doesn't use Adobes fdf. The files for this are here. http://koivi.com/fill-pdf-form-fields/ There's also better documentation there.
  14. fdf sounds like it's what you're after. You can populate your PDF from an array with the fields of the pdf in it. require_once 'createFDF.php'; $data=array("formfieldinpdf1"=>$valuefromsugar1,"formfieldfrompdf2"=>$valuefromsugar2,"etc"=>"etc"); $fdf_file=strtotime(date("Y-m-d H:i:s")).".fdf"; $fdf_dir=dirname(__FILE__).'/fdf'; $pdf_doc="path to your pdf"; $fdf_data=createFDF($pdf_doc,$data); if($fp=fopen($fdf_dir.'/'.$fdf_file,'w')){ fwrite($fp,$fdf_data,strlen($fdf_data)); echo $fdf_file,' written successfully.'; }else{ die('Unable to create file: '.$fdf_dir.'/'.$fdf_file); } fclose($fp);
  15. <?php echo "<img src='".$yourimage."'/>"; ?>
  16. The last one is what I would use. I try to separate everything into separate tables with ids. Within reason. That way it's easy to keep everything organized and normalized.
  17. I don't think it works quite like that. From the manual. $vowels = array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U"); $onlyconsonants = str_replace($vowels, "", "Hello World of PHP"); I'm pretty sure you'd have to do each of the three separately in your 3rd example.
  18. I'm not sure this will work, using str_replace to put an array in a string. unless you want the results to be "up down forwards backwards up down forwards backwards up down forwards backwards" etc.. then you would probably do str_replace($find,implode(" ",$array),$text);
  19. instead of $errors0-whatever do $errors['firstname']="Error"; etc.. makes it easier to look at in the future.
  20. put this ini_set('display_errors',1); error_reporting(E_ALL); at the top of your script. See if that gives you anything useful.
  21. search google for css menu tutorial pick one and change your classes/html structure to match.
  22. substr $big=3410 $big=substr($big,-2);
  23. to secure it you can use a file to define them, set permissions on that file to read only for your web user and put that outside of the web root <?php define("DB_PASSWORD","yourdbpassword"); define("DB_USER","yourdbuser"); ?> then in your connection script require_once '/var/www/db.config.php'; mysql_pconnect("www.freesqldatabase.com",DB_USERNAME,DB_PASSWORD)
×
×
  • 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.