Jump to content

liam1412

Members
  • Posts

    170
  • Joined

  • Last visited

    Never

Everything posted by liam1412

  1. You can do this using the nl2br() function basically $text = nl2br($text); That will format it for you
  2. Okay all you need to do is loop through the details using a while loop and a create a mail function for each one then Assuming your taking the data from the database select the e-mail address using this $get_addy = mysql_query("SELECT email FROM users") while($array = mysql_fetch_array($get_addy)){ create your mail function here } This will loop through your database until there is no users left. Im no exchange expert but im sure it would just que them up if php was running faster than the mailer could send.
  3. Well as im feeling in a good mood create a file called form.php Create a database using phpmyadmin on your server and a table named details with 3 fields detail_id // This should be set up as an auto increment field name address <?php if(isset($_POST['submit'])){ // This checks to see if the submit button has been pressed. $name = $_POST['name']; //note the index in between the [] is the name of the inputs $address = $_POST['address']; $insert = mysql_query("INSERT INTO details (name, address) VALUES ('$name', '$address')"); if($insert){ echo 'Details added succesfully'; } else { echo ' There was a problem updating the database'; } } else { // Here we close the original if statement checking if submit had been pressed. If it hasn't then //the form will display. ?> //closing the php to display html <form name="form1" action="form.php" method="post"> <input type="text" name="name" /> <input type="address name="address" /> <input type="submit" name="submit" /> </form> <?php } ?> // this closes the else statement You should also look into sql injection. The data entered in a form can be used to edit details or even destroy tables in your database. There are a number of function to clean the data you collect in form to check it isn't mailicious. But that is a whole ne ball game. Is that any good
  4. Well its a bit clumsy but you could set up a table in your db called temp info. You could then insert the details into that as you go then transfer the details into your proper table on completion. Remebering to delete from this temp table when you've finished. Are you noob or just looking for a solution So
  5. Im not so sure what you mean. Can you not just send it through using a while loop to put all the email addys in the to: box of one e-mail.
  6. I have peice of code at home that will do both the smilie function and also wrap around highlighted code for things like code and quote. If you e-mail liam1412 ((at)) btinternet.com I will send it you when I get home from work around 7.30. that is if no one else replies by then.
  7. Well Im pretty noob as well but thats the only solution I can think of. Why do you need to send more data?
  8. You could always just use a URL instead of a form <a href="processing.php?productid=<?php echo $productid; ?>">Add To Cart</a> Then in processing.php use GET to query the URL. Don't forget that what you receive over a URL needs to be checked. $productid= $_GET['productid']; //check to see if its what you expect if(!is_numeric($productid)){ Echo 'The product Id is invalid. Was this a feeble attempt at SQL injection'; } else { REST OF PROCESSING HERE } You can then change the link to an image and use javascript for the hover or click effects
  9. All you need to do to get it to send the details to your e-mail is change $addy = $email to $addy = 'ilovecakelots@gmail.com'; That any good for you.
  10. Ok all you need to do is collect the data using POST and then put it into a mail script This is just an example from one I used. This relies on you having a mail server set up on your host. If you buy web hosting chances are you will have and it will be all set up ready to go. if you are testing on your local host you can use a program called AGS mail server. http://www.phpeasystep.com/phptu/23.html This is a tutorial on setting up AGS Mail server on your localhost for testing. Anyways the script is $from = 'admin@rotherham-guide.com'; $addy = $email; $subject = 'Welcome to rotherham-guide.com'; $message = 'The Body of the message goes here'; $send = mail($addy, $subject, $message, "From:$from\n" . "MIME-Version:1.0\n" . "Content-type:text/html; charset=iso-8859-1");
  11. Hi Just wondering if anyone knows if it is possible to print direct from a php script on my host to a remote location ie at my house. Also if this is possible is it possible to hold a que until my computer is on. Thanks
  12. Hi Thanks for the comment. What browser is it you use.
  13. I see. Cheers obsidian. John - I use mysql_real_escape_string and htmlspecialchars to clean. is that not sufficient. Although I recently found out my host on a shared server has magic quotes on - does that make a difference.
  14. You mean re-clean every variable after it is passed through a url. Wow. thats some work.
  15. Oh sh*t thats not good. Any ideas how I can remedy this.
  16. SHould be sorted now. That's weird that coz I already fixed that issue once and it seems to have reappeared. You are registered tho. Its just the part where it was checking for existence of the username already but there was no exit so it registered you anyway. ta
  17. Hi My site has recently launched in the testing stages. Please let me know what you think any problems you encounter. www.klubdeutsch.com
  18. Nice one mate. That works ace!!!!!!!!!!!!!!!!!!! Cheers mate
  19. Im none too sure about converting but would be happy to programme the whole thing and add the details manually. Depending on size prob wouldn't charge too much as Im trying to build a portfolio. Get in touch with me on here if you are interested.
  20. Nice one!!!!!! Will this also work wit tables as I have been naughty and wrote some of the site with tables including the forum layout. Thanks
  21. Hi I want users to be able to add images to there posts but I hate it when you have to scroll sideways on forum. And I mean HATE!!!!!!!!! Is it possible to check the size of an image on its way in from somewhere like photobucket etc???????? Muchos Grazias In advance. Ciao!
  22. God this is so basic but I cannot find it. I know I knew this a while ago but it has slipped my mind. How do I set the size of a new window from a link. ie <a href taget="new"> Whats the rest of it please. Sorry to be a dumbass.
  23. I know thats what it means but how go about storing the info of what threads people have subscribed to without having a massive table.
  24. Whats the bes DB structure etc for having this sort of function in my forum. 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.