Jump to content

littlemiss

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

littlemiss's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks for the reply, turns out my host is on windows, i just inserted the following code and it seems to work: ini_set("sendmail_from", " webmaster@email.com "); I dont know why! lol, but thanks!
  2. Oh woe! I really suck at php, but i need to work on some form of form processing for the website I have to design. I tried following the tutorial at http://apptools.com/phptools/forms/ but even on lesson 1 my form is being bad and I cant seem to fix it. It looks fine and then tells me that the message has been sent to my email address but it never arrives. I have tried another tutorial at another site and the same thing happened. any ideas what this could be? Here is the oh so simple code of the example, and yes i have been putting the right email address in the myemail part :S <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $me = $_SERVER['PHP_SELF']; ?> <form name="form1" method="post" action="<?php echo $me;?>"> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td>Name:</td> <td><input type="text" name="Name"></td> </tr> <tr> <td>Subject</td> <td><input type="text" name="Subject"></td> </tr> <tr> <td valign="top">Message:</td> <td><textarea name="MsgBody"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Send"></td> </tr> </table> </form> <?php } else { error_reporting(0); $recipient = 'myemail@myaddress.co.uk'; $subject = stripslashes($_POST['Subject']); $from = stripslashes($_POST['Name']); $msg = "Message from: $from\n\n".stripslashes($_POST['MsgBody']); if (mail($recipient, $subject, $msg)) echo nl2br("<b>Message Sent:</b> To: $recipient Subject: $subject Message: $msg"); else echo "Message failed to send"; } ?>
  3. Hey, I am very very very very bad at PHP and I am trying to improve. But anyway, I found a great script which turns a HTML page into a PDF, but the problem is it turns the whole page, with layout etc, into the pdf, which looks really bad with all the navigation etc, on it. I am trying to come up with a function to only include in the pdf the actual things I want, if you understand me. This is the original code: <?php require('html_to_pdf.inc.php'); $htmltopdf = new HTML_TO_PDF(); //$htmltopdf->useURL(HKC_USE_EASYW); // default HKC_USE_ABC other HKC_USE_EASYW $htmltopdf->saveFile("abc.pdf"); $htmltopdf->downloadFile("abc.pdf"); //$result = $htmltopdf->convertHTML("<b>MY TEST</b>"); $result = $htmltopdf->convertURL("$value"); if($result==false) echo $htmltopdf->error(); ?> and so far this is all i managed to work out myself, $beginingofcontent = "<!--top-->"; $finishofcontent = "<!--bottom-->"; LOL, i know i am bad, but I am not asking for someone to code it for me, I am just asking on someone to give me tips on how and where to look, any help would be really great. Thanks
×
×
  • 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.