Jump to content

fazzfarrell

Members
  • Posts

    154
  • Joined

  • Last visited

    Never

Everything posted by fazzfarrell

  1. I am looking to find a decent tutorial or software that will run on a php based site to send an automatic email when a user creates an account. Then 2 days later another email will be auomaticaly sent and so on..can any one help? thanks
  2. I am currently creating a dating website - One problem I can't work is that the user is only allowed to upload 10 pictures. I want to be able to allow them to upload 10 pics only how do I go on about doing this?
  3. revraz worked a treat thank s all!
  4. just wrote this and cant get it to work <?php //Rob Farrell add up options costs $BasePrice = $row_rsBaseProduct['BasePrice']; $gap = $HTTP_GET_VARS['gap']; if ($gap == 0.00) { $gap== $BasePrice; } $fin = $HTTP_GET_VARS['fin']; $post = $HTTP_GET_VARS['post']; $Apost = $HTTP_GET_VARS['Apost']; $Finials = $HTTP_GET_VARS['Finials']; $sum_total = $gap+$fin+$post+$Apost+$Finials; echo ($sum_total); ?> If the $gap price = 0.00 I Want it to pick up the $BasePrice, but it wont. I can echo the BasePrice? What am I doing wrong?
  5. distinct thats it, think I may go blonde if I had any hair! thanks
  6. Thanks, not expained myself properly I have a database with rob rob rob pete pete lin I want rob pete lin to appear on the page
  7. I done this so many times before! but can not rememebr! I have a data base which had lots of names in it, I only want to pull in one version of the name into the page, any one help!
  8. quality, thats what I need, just created a quick test and seems to work fine! thanks for your help, both of you have a good weekend!
  9. erm, I have it at the moment calling the pictures by eitheir ProdID=red or ProdID=green etc with pulls the pictures onto the page by there main catagory. This works fine, can't I associate each picture with say pic03 ProdID 1,2,4 in the database (relating to the different colours) and then do a sql statement so that when = '1' it wil pick up any picture that has '1' within the prodID of the table?
  10. thanks, how do you mean run a loop?
  11. I have a databse of pictures that are going into a database, they all relate to different section such as 'blue' 'red' green' 'yellow' etc. But some belong to more than one section such as pic03 belongs to 'red' 'green' and yellow etc. So I need to call them in to differnet sections can anyone shine any light on how to do this?
  12. DISTINCT was what I was looking for but does not do the trick! 1 col has number references and the other file name so still shows all the records!
  13. Idone this many times before but now I'm drawing a blank! A table (gallery of pics) with 15 of them refereced '1' and another 10 referenced '2' At the moment I am pulling in all the records all I want to do is pull in one from ref 1 and one from ref 2 and so on how do I do it?
  14. I need a good starter! Never done this before!
  15. I have a site which has news stories on it fed from a MySQL database - I want to add a link that will emailthe story and a picture to a desired email address any one tell me where I can find the information on how to do this? thanks
  16. I am building a shopping cart site using MySQL and PHP and the client as asked if we can sell the pictures from it to send to mobile phones as a wallpaper. I have never done this before does anyone know where I can get information on how to set it up? thanks
  17. I have created this form, I had a simalar one that was working fine and now it does not send - or bring up any error messages just re displays the page. I have gone through the code and can't see where I am going wrong - any one help? <? // Change to your own email address $your_email = "rob.farrell@myemail.co.uk"; // This is what is displayed in the email subject line // Change it if you want $subject = "Message via your pimped contact form"; // This is displayed when the email has been sent $thankyou_message = "<p>Thank you. Your message has been sent.</p>"; $self = $_SERVER['REQUEST_URI']; $name = $_POST['txtName']; $company = $_POST['txtCompany']; $tel = $_POST['txtTel']; $email = $_POST['txtEmail']; $web = $_POST['txtWeb']; $message = $_POST['txtMessage']; $nameR = $_POST['txtNameR']; $companyR = $_POST['txtCompanyR']; $telR = $_POST['txtTelR']; $emailR = $_POST['txtEmailR']; $webR = $_POST['txtWebR']; $messageR = $_POST['txtMessageR']; $sendR = $_POST['send']; $msg="<p>Please fill in this form to refer a company.</p>"; echo ($msg); $form = " <form method=\"post\" action=\"$self\"> <p><label for=\"txtName\">YOUR DETAILS<br /> Name:<br></label> <input type=\"text\" title=\"Please enter your name\" id=\"txtName\" name=\"txtName\" size=\"40\" value=\"$name\" /></p> <p><label for=\"txtCompany\">Company:<br></label> <input type=\"text\" title=\"Please enter your company name\" id=\"txtCompany\" name=\"txtCompany\" size=\"40\" value=\"$company\" /></p> <p><label for=\"txtTel\">Telephone:<br></label> <input type=\"text\" title=\"Please enter your telephone number\" id=\"txtTel\" name=\"txtTel\" size=\"40\" value=\"$tel\" /></p> <p><label for=\"txtEmail\">Email:<br></label> <input type=\"text\" title=\"Please enter your email address\" id=\"txtEmail\" name=\"txtEmail\" size=\"40\" value=\"$email\"/></p> <p><label for=\"txtWeb\">Web URL:<br></label> <input type=\"text\" title=\"Please enter your website url\" id=\"txtWeb\" name=\"txtWeb\" size=\"40\" value=\"$web\"/></p> <p><label for=\"txtMessage\">Please enter your address:<br></label> <textarea title=\"Please enter your message\" id=\"txtMessage\" name=\"txtMessage\" rows=\"3\" cols=\"37\">$message</textarea></p> <p><label for=\"txtNameR\">THEIR DETAILS<br /> Name:<br></label> <input type=\"text\" title=\"Please enter their name\" id=\"txtNameR\" name=\"txtNameR\" size=\"40\" value=\"$nameR\" /></p> <p><label for=\"txtCompanyR\">Company:<br></label> <input type=\"text\" title=\"Please enter your company name\" id=\"txtCompanyR\" name=\"txtCompanyR\" size=\"40\" value=\"$companyR\" /></p> <p><label for=\"txtTelR\">Telephone:<br></label> <input type=\"text\" title=\"Please enter your telephone number\" id=\"txtTelR\" name=\"txtTelR\" size=\"40\" value=\"$telR\" /></p> <p><label for=\"txtEmailR\">Email:<br></label> <input type=\"text\" title=\"Please enter your email address\" id=\"txtEmailR\" name=\"txtEmailR\" size=\"40\" value=\"$emailR\"/></p> <p><label for=\"txtWebR\">Web URL:<br></label> <input type=\"text\" title=\"Please enter your website url\" id=\"txtWebR\" name=\"txtWebR\" size=\"40\" value=\"$webR\"/></p> <p><label for=\"txtMessageR\">Please enter your address:<br></label> <textarea title=\"Please enter your message\" id=\"txtMessageR\" name=\"txtMessageR\" rows=\"3\" cols=\"37\">$messageR</textarea></p> Please enter the text that you see in the image into the box below. <label> </label> <div class=\"captcha\"><img src=\"includes/captcha.php\" alt=\"security image\" /></div> <label for=\"verify\">Anti-Spam key:<br></label> <input type=\"text\" title=\"Please enter the anti-spam key\" name=\"verify\" id=\"verify\" size=\"40\" /> <p><label> </label> <input type=\"submit\" class=\"sendbutton\" name=\"send\" value=\"Submit\" /></p> </form>"; if($send) { $valid=true; if( !$name ) { $errmsg.="Please enter your name:<br />"; $valid=false; } if( !$email ) { $errmsg.="Please enter your email address:<br />"; $valid=false; } else { $email = trim($email); $_name = "/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+"; $_host = "([-0-9A-Z]+\.)+"; $_tlds = "([0-9A-Z]){2,4}$/i"; if( !preg_match($_name."@".$_host.$_tlds,$email)) { $errmsg.="Email address has incorrect format!<br />"; $valid=false; } } if( !$message ) { $errmsg.="Please enter your message:<br />"; $valid=false; } if (empty($_POST['verify']) && $_POST['verify'] == $_SESSION['captchstr']) { $errmsg.="Please enter security image:"; $valid=false; } } if( $valid !=true ) { echo( "<span style=\"font-weight: bold; color:red;\">".$errmsg."</span>" . $form ); } else { // Stop the form being used from an external URL // Get the referring URL $referer = $_SERVER['HTTP_REFERER']; // Get the URL of this page $this_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"]; // If the referring URL and the URL of this page don't match then // display a message and don't send the email. if ($referer != $this_url) { echo "You do not have permission to use this script from another URL.<br />"; echo "If you are behind a firewall please check your referrer settings."; exit; } // The URLs matched so send the email if( mail($your_email, $subject, $message, "From: $name <$email>")); { // Display the thankyou message echo $thankyou_message; } } ?>
  18. got it thanks, got it perfect by doing this <div class="AccordionPanelTab"><?php echo substr($row_rsNewsItems['Title'], 0, 34); ?>...</div> thanks
  19. i tried this thanks <div class="AccordionPanelTab"><?php echo substr('$row_rsNewsItems['Title']', 1); ?></div> and I get an error Parse error: syntax error, unexpected T_STRING?
  20. I have this: <div class="AccordionPanelTab"><?php echo chop($row_rsNewsItems['Title']); ?></div> and I want to trim the length of the title so it is only 100 chareters wide, where do I start?
  21. Hi I have found some code for a php form, with a sectrity image which works fine as this: </code> <?php // check for posted form if (isset($_POST['login'])) { // see if the code the user typed matched the generated code if (strtoupper($_POST['code']) == $_SESSION['code']) { echo 'Congratulations, you entered the correct code.'; } else { echo 'You have entered the wrong code. Please <a href="contact2.php">try again</a>.'; } } else { ?> <form method="post" action="contact2.php"> <fieldset> <legend></legend> <label for="Name"> Send to: <select name="Email" id="Email"> <?php do { ?> <option value="<?php echo $row_rsContact['EMail']?>"><?php echo $row_rsContact['Manager']?></option> <?php } while ($row_rsContact = mysql_fetch_assoc($rsContact)); $rows = mysql_num_rows($rsContact); if($rows > 0) { mysql_data_seek($rsContact, 0); $row_rsContact = mysql_fetch_assoc($rsContact); } ?> </select> <br /> <br /> Name:</label> <input type="text" name="Name" id="Name" value="" /> <label for="Email">Email:</label> <input type="text" name="EMail" id="EMail" value="" /> <label for="Subject"> Subject:</label><input type="text" name="Subject" id="Subject" value="" /> <label for="Subject"> Message:</label> <textarea name="Message" rows="10" id="Message"></textarea> <div id="security"><img src="../security-image.php?width=144" width="144" height="30" alt="Security Image" /></div> <label for="code">Security Image:</label> <input type="text" name="code" id="code" value="" /> <input type="submit" name="login" id="login" value="Login" /> </fieldset> </form> <?php } ?><code> Which is great but does not send the message! Usually I send via <form method="post" action="wmdformmailer.php"> but od course this does not work! I have tried many ways to get it to work to no avail any one help?
  22. Thanks I realised I had no space just after I posted, but even then i can't get it to work
  23. I have put the following statment: <code> SELECT DISTINCTOrders.ID, Orders.OderNum, Orders.ProdCode, Orders.ProdeName, Orders.ProdePrice, Orders.Supplier, Orders.OrderDate, Orders.Payment, Orders.QTY, Orders.Sent, Orders.OrderTotal, Orders.`Size`, Orders.Colour, customer.Customer, customer.Orderid FROM Orders, suppliers, customer WHERE suppliers.Email = colname AND Orders.Supplier = suppliers.Supplier AND Orders.Payment = 'YES' AND Orders.OderNum = customer.Orderid ORDER BY Orders.OrderDate DESC <CODE> The order no col can have eg 6 order numbers all the same- so I want to display the order no only once on the repeat region but as the other cols have other information it shows up everything! How do I change my statement to only show one copy of each order number?
  24. I have a database set up with 'Areas' such as Birmingham, london, Bristol etc. We have a search page with a drop down with the vales of Birmingham, london etc wich works fine and picks up the relevant data. What we also want to do is have a label of 'All' so that it will pick all the areas, what shuld the value be?
×
×
  • 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.