Jump to content

klinmy

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by klinmy

  1. i'm trying to generate pdf file with php. but when i open the .php file in my IE browser, it came out all the weird characters, and when i refresh the page, it became blank.. is it because of my scripts? or my Adobe setting? i've also tried to disable adobe plugin, but nothing works.. what might be the problem.. thanks in advance!
  2. i've found a better easier way of doing tht :D thx anyway
  3. it's the codes i'm trying on. i need to get the info from previous page and then place it in the textarea as the email body together with a link. [code]<form name="frm11" form action="" method=post>   <center><textarea name="Body"  ROWS="10" COLS="100">   <? include ("".$_SERVER['DOCUMENT_ROOT']."/cuti3/includes/config.php"); $_SESSION['uid'] = $uid; $_SESSION['pwd'] = $pwd; $query=mysql_query("SELECT * FROM staff WHERE id='$uid'"); <?php echo $_GET[id] ?> is a <?php echo $_GET[sex] ?> <A HREF = "form.php"><font face="verdana" size="2" > click here </A></FONT>&nbsp;&nbsp; </textarea></center> <? if(isset($send)) {              require("class.phpmailer.php");     $mail = new PHPMailer();     $mail->IsSMTP(); // telling the class to use SMTP     $mail->Host = "smtp.tm.net.my"; // SMTP server     $mail->From="user@tm.net.my";     $mail->FromName = "ky";     $mail->AddAddress("user@hotmail.com");     $mail->Subject = "hi";     $mail->Body = "$Body";     $mail->WordWrap = 50;     if(!$mail->Send())     {       echo "Message was not sent\n";       echo "Mailer Error: \n" . $mail->ErrorInfo;     }     else     {       echo "Message was sent successfully!";     }          }[/code]
  4. thanks AV1611, but i need to "wrap" the codes in '$body' as that is the info i am going to send out via mail() function, that's why i use textarea.. any better suggestion so that i can do that? (place a link in my mail() $body) thanks
  5. can i place a link in textarea like what i did below? [code]  <center><textarea name="Body"  ROWS="10" COLS="100"> this is text area body. <A HREF = "form.php"><font face="verdana" size="2" > click here </A></FONT>&nbsp;&nbsp; </textarea></center>[/code] but it just printed out the total code of <a href= > instead of appearing as a link. thanks
  6. how do i need to control the buttons? for example when i press the button "Add" the "Save" button will automatically enable, in other words, the "Save" button is disable before "Add" button is pressed. can i set this condition in PHP? i've surfed through some sites, but still no solution can be found.. it's the only way i know how to disable a button.. <input name="save" type="submit" class="style7" value="save" disabled> thanks..
  7. i would like to calculate working days (except for friday and saturday) between 2dates. how should i do? [code]<?    $today =  $end_date;    $pastdate = $start_tarikh;    $explodetoday = explode("/", $today);    $stoday = mktime(0, 0, 0, $explodetoday[1], $explodetoday[0], $explodetoday[2]);    $explodepastdate = explode("/", $pastdate);    $spastdate = mktime(0, 0, 0, $explodepastdate[1], $explodepastdate[0], $explodepastdate[2]);    $sDifference = $stoday - $spastdate;       $total= ($sDifference / 60 / 60 / 24 ); ?>[/code] it works well to count the number of days without considering friday and saturday are offdays. wht should i add on in above code inorder to count only days except for friday and saturday? thx
×
×
  • 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.