Jump to content

shaunrigby

Members
  • Posts

    196
  • Joined

  • Last visited

    Never

Everything posted by shaunrigby

  1. I am not going to do you a tutorial, google is ur friend, a simple search will bring you all ur answers and tutorials: http://www.google.co.uk/search?hl=en&q=php+include&meta= you also need to learn some basic HTML and CSS
  2. 1 thing i want to know, why you executing the same script twice? also, did you write this script because you are vunerable to SQL INJECTION ATTACKS!
  3. yea forgot to put that, cheers frost110
  4. To configure wer the form would post/get variables to would be defined in the action part yes, i dnt really understand what you mean with the cost, are you wanting to get the total cost of everything? or wat? please elaborate...
  5. $headers = "From: Name <Freeola Email Address>"; $headers .= "Reply-Path: Name <Reply email address>"; mail($to, $subject, $message, $headers); www.php.net search for mail for more accurate help with the mail() function
  6. Yes that is correct, however i noticed something in your last post echo ' you purchased .$size inches pipe ' if $size is defined as $size = $_POST['Size']; then this will work, if not, you would use echo ' you purchased ' . $_POST['Size'] . ' inches pipe '
  7. This is more of a JavaScript Jobby, visit www.dynamicdrive.com for free to use scripts
  8. <?php $exploded = explode(" - ",$string); ?> The values will be stored in an array
  9. Are you wanting to obtain page titles from other pages such as google, yahoo, jeeves etc to store in a database; or are you wanting to obtain page titles from a database of defined titles for your website?
  10. Depending on what you want to output, because you are using the POST Method in your form, you would use $_POST['variable]', where variable is what you have defined in your form, such as <select name="Size"> So, in your example, if say, for example, a customer selects 12 inches of pipe, in PHP you would type: <?php print "You have purchased, " . $_POST['Size'] . " of pipe."; ?>
  11. Where is it not working? on the page? or in the email?
  12. CRAZY! Possibly an IE cache problem?
  13. Plus, i don't know if it is true, but if you press enter(rather than clicking submit), Submit is not defined, a safer option would be to use: <input type="hidden" name="submitted" value="true">
  14. sh!t, sorry the link was meant to be www.spacebarcomputers.com/polyglot/
  15. Your script probably wnt work, because you have no headers, see here for some info; http://www.htmlite.com/php029.php
  16. Possibly set a timestamp in a db table since the last reset, and on user requests, check the time stamp, and if the timestamp is greater than the timestamp, perform a reset, if not then resume.... just a suggestion?
  17. I am still unsure as to what you want to do, what are you wanting to grab from the database? actual page content, or variables such as page title etc?
  18. Yea, if you visit http://www.spacebarcomputers.com, and click on Contact us, fill random data into the form and press send, you will the be redirected to the index page, however the form processing page is still shown in the address bar. The script is below (note this is a BETA script) <?php //Polyglot feedback form processing //(c) 2007 Shaun Rigby @include_once 'includes/variables.php'; $formCheck = TRUE; $reasonCount = 0; $formFrom = $_POST['Name']; $formSubject = $_POST['Subject']; $formMessage = $_POST['message']; if($formFrom == NULL){ $formCheck = FALSE; $reasonCount++; $failureReason = "<li>You must give a name.</li>"; } if($formSubject == NULL){ $formCheck = FALSE; $reasonCount++; $failureReason = "<li>You must give a message subject.</li>"; } if($formMessage == NULL){ $formCheck = FALSE; $reasonCount++; $failureReason = "<li>You must type a message.</li>"; } //------------------------------------------------------------------------------------------// //If formCheck = true, send mail if($formCheck = TRUE){ //Compose Headers $headers = "From: Polyglot Website <$sendMailFrom>\r\n"; $headers .= "To: $sendMailName <$sendMailTo>\r\n"; $headers .= "Message-ID: <" . md5(date("GHs")) . "@" . $_SERVER['SERVER_NAME'] . ">\r\n"; $headers .= "X-Priority: 3\r\n"; $headers .= "X-Mailer: PHPMailer [version " . phpversion() . "]\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/plain\r\n"; //Compose Subject $subject = "You have received a message from your website."; //Compose Message $message = " Dear $sendMailName, $formFrom, has send you a message with the subject, $formSubject, the message is below; $formMessage"; //Send Mail $mailStatus = mail($sendMailAddress,$subject,$message,$headers); if ($mailStatus = TRUE){ header("Location:" . $websiteURL . "?pageid=9295"); } }
  19. You need to setup your SMTP server IP Address with MSN, they have in-house developed technologies that filter email, although M$ wont reveal how it works, you can submit a request to add your server to there "safe list", you can do so by visiting https://postmaster.live.com/snds/
  20. Hi guys, i am an amateur at PHP and I am building a website for a client, however i seem to have a problem with the header part of the script. I have a simple form-mail script, and when the mail is sent the form relocates back to the home page, this is all fine and dandy, however the URL to the script processing page, still appears in the address bar; is this an IE7 fault? or is it actually PHP? is there a way around this? Cheers Guys
×
×
  • 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.