Jump to content

Gubbins

Members
  • Posts

    66
  • Joined

  • Last visited

    Never

Everything posted by Gubbins

  1. It worked when i added closed quotes to the $html ="<img src='beerchug.gif'>"; but at the end of the image in the email i get ; <---that symbol..
  2. Hello, I have tried to make a email that includes a small banner picture at the top of the email before the main text. If it is possible could someone please show me where in the code i could add the image address? $to = "".$name." <".$email.">"; $subject = "Test Login Details"; $message = "Thankyou for registering at Test, your login details are as follows: <br /> <br /> Playername: <b>".$name."</b> <br /> Password: <b>".$password."</b> <br /> <br /> You can now login at: <a href=\"http://www.test.com\">http://www.test.com</a> <br /> <br /> If you have any questions or queries please contact us (via the contact link at the bottom of the login page or message <b>Mr Test</b>) and we will be happy to assist you in what ever troubles you. <br /> <br /> You can now follow us on <b>Twitter</b> <url>http://twitter.com/test</url><br /> and on <b>Facebook</b> <url>http://www.facebook.com/test</url></center><br /> <br /> <i>Kind Regards <br /> test team</i> <br />"; $headers = "From: test@test.com\r\n" . 'X-Mailer: PHP/' . phpversion() . "\r\n" . "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=utf-8\r\n" . "Content-Transfer-Encoding: &#173; 8bit\r\n\r\n"; mail ($to, $subject, $message, $headers);
  3. looks like that code would work but there is to much to edit for me to do it i.e.:- myField.value = myField.value unsure what to put in here!
  4. hi, this bit of Java is the put emoticons into a message box, it always puts them at the end of the message and not were the cursor is flashing, anychance someone can work this out please? var textarea; function addcode(code) { textarea = document.formsend.msg; if (document.selection) { textarea.focus(); var sel = document.selection.createRange(); sel.text = "["+code+"]" + sel.text + "[/"+code+"]"; } else { var len = textarea.value.length; var start = textarea.selectionStart; var end = textarea.selectionEnd; var sel = textarea.value.substring(start, end); var replace = "["+code+"]" + sel + "[/"+code+"]"; textarea.value = textarea.value.substring(0,start) + replace + textarea.value.substring(end,len); } }
  5. I would proberly add it like this anyway:- <?php require("somefolder/dbino.php"); ?>
  6. I ask a simple question why would you need the database info file to include this:- include($_SERVER['DOCUMENT_ROOT']."/somefolder/dbinfo.php"); All other files need it but not the dbinfo.php file...
  7. Hi, This piece on sql ends up putting a new topic on the last page, is there anychance it can be altered so that a new topic is on the first page? $query = mysql_query("SELECT * FROM topics WHERE forum = '$forum' ORDER BY `s` DESC, lastreply DESC LIMIT $forum_look , $forum_count")or die("Couldn't get topics:" .mysql_error()); $num = mysql_num_rows($query);
  8. ok i tried this but still no joy $dead=$row['playername FROM Players']; Any ideas?
  9. I think all i need is an example to know what to change, can anyone help?
  10. Thank you for your fast response and explanation. I changed it to $dead=$row['playername']; i know this is not right, but to be honest this small piece of code is to much for me! i dont understand what needs to go in here! I know you said "to whatever the column is called in your 'players' table that has the value of the 'owner' column in your 'garage' table". under the players table i have 'playername' something tells me i am still wrong!!!
  11. cause i dint know what to put in this section:- $dead=$row['owner field from players'];
  12. Thanks no errors but it didn't work :S
  13. I now have this:- <?php require("connections/db.php"); require("connections/require.php"); $que = mysql_query("SELECT * FROM `staff` WHERE `playername` = '$player' LIMIT 1")or die(mysql_error()); $arr = mysql_fetch_array($que); $lvl = $arr['level']; if ($lvl == 4){ if ($_POST['clean']) $result_dead=mysql_query("SELECT * FROM `players` WHERE `status` == 'dead'"); while ($row_dead = mysql_fetch_array($result_dead, MYSQL_ASSOC)) { $dead=$row['owner field from players']; } mysql_query ("DELETE FROM `garage` WHERE `owner` = '$dead'"); echo "Success"; } ?> <html> <head> <title>DataBase Cleaner</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <br /> <form action="clean.php" method="post"> Clean the Database <br /> <br /> <br /> <br /> <input name="clean" class="submit" type="submit" value="Submit" id="clean"> <? } else{ echo "No Access"; die(); } ?> with this error:- Parse error: syntax error, unexpected '}' in clean.php on line 40
  14. I cant seem to get the code correct, can anyone see the error please? <?php $que = mysql_query("SELECT * FROM `staff` WHERE `playername` = '$player' LIMIT 1")or die(mysql_error()); $arr = mysql_fetch_array($que); $lvl = $arr['level']; if ($lvl == 4) { if ($_POST['clean']){ $dead = mysql_query("SELECT * FROM `players` WHERE `status` == 'dead'"); mysql_query ("DELETE FROM `garage` WHERE `owner` = '$dead'"); echo "Success"; } ?> <html> <head> <title>DataBase Cleaner</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <br /> <form action="clean.php" method="post"> Clean the Database <br /> <br /> <br /> <br /> <input name="clean" class="submit" type="submit" value="Submit" id="clean"> <? } else{ echo "No Access"; die(); } ?>
  15. when people click the smilies when writing or replying to a message they go to the bottom of the reply and not were they are writing? is it an easy fix??? <script type='text/javascript'> function hideSendbutton(obj){ // var myForm = document.formsend; obj.style.visibility = 'hidden'; } </script> <script language="JavaScript"> function addsmilie(bbcode) { reply = document.formsend.msg.value; document.formsend.msg.value = reply + ' ' + bbcode + ' '; document.formsend.msg.focus(); } var textarea; function addcode(code) <tr><td align="center"> <img src="Smiles/cool.gif" title="cool" onClick="addsmilie(':8');"> <img src="Smiles/lol.gif" title="lol" onClick="addsmilie('lol');" > </td></tr>
  16. when people click the smilies when writing or replying to a message they go to the bottom of the reply and not were they are writing? easy fix??? <script type='text/javascript'> function hideSendbutton(obj){ // var myForm = document.formsend; obj.style.visibility = 'hidden'; } </script> <script language="JavaScript"> function addsmilie(bbcode) { reply = document.formsend.msg.value; document.formsend.msg.value = reply + ' ' + bbcode + ' '; document.formsend.msg.focus(); } var textarea; function addcode(code) <tr><td align="center"> <img src="Smiles/cool.gif" title="cool" onClick="addsmilie(':8');"> <img src="Smiles/lol.gif" title="lol" onClick="addsmilie('lol');" > </td></tr>
  17. thats link doesnt work. But dont worry Andy-H solved it cheers mate..
  18. Thanks Yucky but that didnt work at all :S i am going to call it a night now but thanks for trying...
  19. Thanks Andy but that didnt work at all :S i am going to call it a night now but thanks for trying...
  20. Yes Yucky Thats it, so i may want to display [player]Gubbins[/player] one one page and maybe your name next to it [player]Yucky[/player] both being so when you click the name it takes you to that players profile...
  21. I did this but it only pulls the first name in the database no matter what name i want it to display...
  22. The mysql_query must be pulled from the field playername but what statement do i put in place of 'x' ?
  23. I am going wrong somewhere with the mysql_query, can someone please put me straight? $playername = mysql_query("SELECT * FROM `players` WHERE `playername` LIMIT 1"); while($f = mysql_fetch_array($playername)){ $txt = str_replace("[player]", "<a href='profile.php?player={$f['playername']}'>{$f['playername']}>", $txt); $txt = str_replace("[/player]", "</a>", $txt); }
  24. I am going wrong somewhere with the mysql_query, can someone please put me straight? $playername = mysql_query("SELECT * FROM `players` WHERE `playername` LIMIT 1"); while($f = mysql_fetch_array($playername)){ $txt = str_replace("[player]", "<a href='profile.php?player={$f['playername']}'>{$f['playername']}>", $txt); $txt = str_replace("[/player]", "</a>", $txt); }
×
×
  • 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.