Jump to content

godleydesign

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by godleydesign

  1. Hi, Can someone help me with User friendly URL and get variables. My file is called test.php and i'm using htaccess to remove the .php part of the url. In theory i want the following: www.example.com/test/1234 1234 is my id= part How can i do this? here's my htaccess so far: Options -Indexes RewriteEngine on RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [L, QSA] RewriteRule ^(.*)$ test.php?/$1 [L] i'm trying to get the get variable by: $var = $_GET['id']; echo $var;
  2. Managed to resolve this myself.
  3. You will most likely want to pass the search term into the function, then when you call the function you can pass the POST variable - allows you to reuse the code throughout the site. example: public function search($searchterm)
  4. Not really sure we understand what you mean? What do you mean asking a question and getting an answer? ​Are you referring to a security to validate if a customer is a real person?
  5. Hi I've wrote a small bit of code which basiclly sends out an email with an jpg attached, nothing fancy. The code works fine when not included within a function. However, as soon as it's included within a function the email still sends.. however no jpg is attached. The code below is it within a function. Any ideas why is it not adding the attachment when inside a function? function resendOrder() { require_once('OrderMailer/class.phpmailer.php');// need this to send email $mail = new PHPMailer(); // HTML body $body = "Testing"; // And the absolute required configurations for sending HTML with attachement $mail->From = "mark@******.co.uk"; $mail->AddAddress("mark@******.co.uk", "My-webpage Website"); $mail->Subject = "test for phpmailer-3"; $mail->MsgHTML($body); $mail->AddAttachment("ploxy.jpg"); if(!$mail->Send()) { echo "There was an error sending the message"; exit; } else{ echo "Message was sent successfully"; } }
×
×
  • 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.