Jump to content

christophe

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

christophe's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there I have written this code to email all the email addresses i have in my database. The content of the email also comes from a row called content /Set mail variables $subject ="Retention Mailing List"; $headers = "Content-Type: text/html; charset=iso-8859-1\n"; $headers .= "From: Retention U.K Ltd <Address>\n"; $headers .= "Reply-to: Retention U.K Ltd <address>\n"; //Query db $query = "SELECT email, content FROM mailinglist"; $result = mysql_query($query) or die(mysql_error()); //fetch mysql array while($row = mysql_fetch_array($result)){ echo $row['email']; echo $row['content']; echo "<br />"; //send mail mail($row[email], $subject, $row[content], $headers); } mysql_free_result($result); It looks as tough everytime an email gets sent the email client (outlook, hotmail, thunderbird) see's them as spam Can anyone help me please ( im a bit of a noobie aswell so apologies if this makes no sense atall)? Thanks Alex
  2. have you defined primary key in sql
  3. have a look at this http://www.w3schools.com/ajax/ajax_database.asp Does it help? Thanks Alex
  4. windows servers are easier to use but i personally go with linux everytime (because i know it)
  5. mmm ive seen lots of these in javascript heres one stick this in the head of your page <script> <!-- Begin var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs) current = 0; function next() { if (document.slideform.slide[current+1]) { document.images.show.src = document.slideform.slide[current+1].value; document.slideform.slide.selectedIndex = ++current; } else first(); } function previous() { if (current-1 >= 0) { document.images.show.src = document.slideform.slide[current-1].value; document.slideform.slide.selectedIndex = --current; } else last(); } function first() { current = 0; document.images.show.src = document.slideform.slide[0].value; document.slideform.slide.selectedIndex = 0; } function last() { current = document.slideform.slide.length-1; document.images.show.src = document.slideform.slide[current].value; document.slideform.slide.selectedIndex = current; } function ap(text) { document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop"; rotate(); } function change() { current = document.slideform.slide.selectedIndex; document.images.show.src = document.slideform.slide[current].value; } function rotate() { if (document.slideform.slidebutton.value == "Stop") { current = (current == document.slideform.slide.length-1) ? 0 : current+1; document.images.show.src = document.slideform.slide[current].value; document.slideform.slide.selectedIndex = current; window.setTimeout("rotate()", rotate_delay); } } // End --> </script> And then stick this were you want to display it Obviously change path to your images <form name=slideform> <img src="PATH_TO_IMAGE" name="show"> <select name="slide" onChange="change();"> <option value="PATH_TO_IMAGE" selected>lob_1 <option value="PATH_TO_IMAGE">lob_2 <option value="PATH_TO_IMAGE">lob_3 <option value="PATH_TO_IMAGE">lob_4 <option value="PATH_TO_IMAGE">lob_5 </select> <input type=button onClick="first();" value="|<<" title="Beginning"> <input type=button onClick="previous();" value="<<" title="Previous"> <input type=button name="slidebutton" onClick="ap(this.value);" value="Start" title="AutoPlay"> <input type=button onClick="next();" value=">>" title="Next"> <input type=button onClick="last();" value=">>|" title="End"> </form> Regards Alex
  6. Thanks for your suggestions boo_lolly I shall check them sites out when i get a chance Kind regards Alex
  7. Heres one way if i read your post correctly echo "$"; if you want to print a variable Print $variablename; Regards Alex
  8. Thanks for your replies much appreciated Indeed this is a large project and im a noob so if i can do it......well anyone can. i have my own company and i get lots of request to make 1-3 page websites. With my sytem i can do these sites easy... half a day and they are done. EASY MONEY all i have to do is create a theme for there site and they can add there content. and without this site my sytem would never have taken off so i thank the creator/creators of this site and all the people that freqeunt it and help guys like me get by A big thankyou to everyone on phpfreaks Kind regards Alex
  9. hi there im currently making a cms system in php for websites what i would like is in the admin area a user can select which "side box" they would like on a particular page for example in the admin area you can add content to the home page. What i need to be able to do is add html to homepage in the form of a checkbox. so if the 1st checkbox is selected. The homepage will show html for checkbox 1 and if the third checkbox is selected. The homepage will show html for checkbox 3 Hopefully you can understand thanks Alex
  10. Im also using the same database as the original form
  11. can you post how you fixed this issue as it helps others in the community Thanks Alex
  12. Hi thanks for your reply Im not getting any errors but when i submit the form it just goes blank and says nothing and nothing happens Regards Alex
  13. Hi i have this script but it will not let me insert the data into mysql can anyone see were i am going wrong <html> <head> </head> <body> <?php if (!isset($_POST['submit'])) { // form not submitted ?> <table width="700" border="0" cellspacing="5"> <tr> <td align="right"> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> Name:</td> <td><input type="text" name="name" size="30"></td> </tr> <tr> <td align="right">Surname:</td> <td><input type="text" name="surname" size="30"></td> </tr> <tr> <td align="right">Username:</td> <td><input type="text" name="userrname" size="30"></td> </tr> <tr> <td align="right">Headline:</td> <td><input type="text" name="headline" size="30"></td> </tr> <tr> <td align="right">About Me:</td> <td><input type="text" name="aboutme" height="30" size="30"></td> </tr> <tr> <td align="right">i'd like to meet:</td> <td><input type="text" name="meet" size="30"></td> </tr> <tr> <td align="right">Music:</td> <td><input type="text" name="music" size="30"></td> </tr> <tr> <td align="right">Films:</td> <td><input type="text" name="films" size="30"></td> </tr> <tr> <td align="right">T.V:</td> <td><input type="text" name="tv" size="30"></td> </tr> <tr> <td align="right">Books</td> <td><input type="text" name="books" size="30"></td> </tr> <tr> <td align="right">Heroes:</td> <td><input type="text" name="heroes" size="30"></td> </tr> <tr> <td></td> <td><input type='submit' value='Submit'></td> </tr> </form> </table> <?php } else{ // form submitted // set server access variables $host = "*********"; $user = "**********"; $pass = "**********"; $db = "**********"; // open connection $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); // select database mysql_select_db($db) or die ("Unable to select database!"); // create query $query = "INSERT INTO members_profile (name, surname, username, headline, aboutme, meet, music, films, tv, books, heroes) VALUES ('$name', '$surname', '$username', '$headline', '$aboutme', '$meet', '$music', '$films', '$tv', '$books', '$heroes')"; // execute query $result = mysql_query($query)or die("Error in query: $query. ".mysql_error()); // print message with ID of inserted record echo "New record inserted with ID ".mysql_insert_id(); echo "<br><br><a href='#' onClick='history.go(-1)'>Back</a>"; // close connection mysql_close($connection); } ?> </body> </html> I have the exact same script on another program and it works fine. The only thing different is I have put the html form into a table. Thanks Alex
  14. Hi there before i begin ill explain what i am doing, I register domain names for people and businesses i know. I have a form which allows me to put in the domain name and the day the domain name  has to be renewed. So what i need is to get this renewal date from the database and take away 30 days. So I know 30 days in advance that the name has to be renewed. Could someone point me in the right direction Any help will be much appreciated Thanks Alex
  15. Hi there, Right O.K I have this code [code] include_once("includes/config.php"); $query="SELECT letter,id,word,description FROM dictionary"; $result = mysql_query ($query); echo "<select name=word=''">Word</option>"; while($nt=mysql_fetch_array($result)){ echo "<option value=$nt[id]>$nt[word]</option>"; } echo "</select>"; ?> [/code] so my question: how do i make this script so when a user selects an option from the drop down box it pulls information from the description field in my database and displays this information on the same page? ive been stuck on this for ages now so any help will be much appreciated Thanks Alex
×
×
  • 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.