Jump to content

tebrown

Members
  • Posts

    114
  • Joined

  • Last visited

Everything posted by tebrown

  1. Ok i will try this now and get back to you.
  2. Ok so it would end up looking something like this? //specify your SMTP domain ini_set ( "SMTP", "smtp-server.example.com" ); // Please specify an SMTP Number 25 and 8889 are valid SMTP Ports. ini_set("smtp_port","25"); //if password auth is required ini_set("username" , "myusername"); ini_set("password", "mypassword"); $subject = mysql_real_escape_string($_REQUEST["subject"]); $body = mysql_real_escape_string($_REQUEST["message"]); $to = "t.e.brown@hotmail.com"; $name = "".$_SESSION['name'].""; $from = "".$_SESSION['email'].""; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=utf-8\n"; $headers .= "To: ".$to."\n"; $headers .= "From: ".$name." <".$from.">\n"; $headers .= "Reply-To: ".$name." <".$from.">\n"; $headers .= "Return-Path: ".$from." <".$from.">\n"; $headers .= "X-Mailer: PHP's mail() Function\n"; $headers .= "\n"; mail($to, $subject, $body, $headers);
  3. Will thi require password and username to access my mail server?
  4. What would be needed to connect to the SMTP server within my php code?
  5. Is there a way to do that on your web hosting mail server?
  6. What would i need to implement into that php for it to access the web server?
  7. What does localhost (MAMP) currently use? I also have a web hosting server that contains a mail domain? - how do i implement into the above code?
  8. Hey Guys, Did some search around these forums, but couldn't find any appropriate topics regarding this that will solve my problem. Anyway, i have set up php mail on my localhost but the messages that i send still get sent to my junk/spam. $subject = mysql_real_escape_string($_REQUEST["subject"]); $body = mysql_real_escape_string($_REQUEST["message"]); $to = "t.e.brown@hotmail.com"; $name = "".$_SESSION['name'].""; $from = "".$_SESSION['email'].""; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=utf-8\n"; $headers .= "To: ".$to."\n"; $headers .= "From: ".$name." <".$from.">\n"; $headers .= "Reply-To: ".$name." <".$from.">\n"; $headers .= "Return-Path: ".$from." <".$from.">\n"; $headers .= "X-Mailer: PHP's mail() Function\n"; $headers .= "\n"; mail($to, $subject, $body, $headers); Would anyone be able to help me out here and look over the code. Any tips to make this better so that it doesn't go to my junk mail? Thanks for your help, much appreciated.
  9. Thanks, solved the problem. Much appreciated.
  10. Thanks, although im still getting the error after i changed that: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in <? $subject = mysql_real_escape_string($_REQUEST['subject']); $message = mysql_real_escape_string($_REQUEST['message']); $get = mysql_query("SELECT * FROM email WHERE club = 'Inglewood' AND team = 'Senior As'"); while ($getrow = mysql_fetch_assoc($get)) { echo $getrow['email']; } ?>
  11. Was just following a tutorial on youtube for creating a mailing list. Ideally i want to send an email to everyone in my team using a form. I copied the php code exactly, but im getting the error of: Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in... <? $get = mysql_query("SELECT * FROM email WHERE club = 'Inglewood' team = 'Senior As'"); while ($getrow = mysql_fetch_assoc($get)) { echo $getrow['email']; } ?> Any help much appreciated.
  12. Yes it is. So that above code would be correct yes? - checking for the inured first...
  13. Would this be appropriate? function teamcolor($color, $injured) { if ($injured == '1') { echo "<div style='height: 100%; width: 3px; background-color: red;'>"; } else if ($color == 'Senior As') { echo "<div style='height: 100%; width: 3px; background-color: #DDAB5B;'>"; } else if ($color == 'Senior Bs') { echo "<div style='height: 100%; width: 3px; background-color: green;'>"; } else if ($color == 'Colts U21s') { echo "<div style='height: 100%; width: 3px; background-color: blue;'>"; } }
  14. Hey Guys, I have just created a function where it determines a team color for their profile. Take a look at the photo for an example. This shows their team color next to their names. What im trying to do now is to determine of this player is injured or not. If the player is injured it will replace the team color for the specific person to red. I have given it a go but its not working as expected. Here is the function: function teamcolor($color, $injured) { if ($color == 'Senior As') { echo "<div style='height: 100%; width: 3px; background-color: #DDAB5B;'>"; } if ($color == 'Colts U21s') { echo "<div style='height: 100%; width: 3px; background-color: #C492F4;'>"; } if ($color == 'Senior Bs') { echo "<div style='height: 100%; width: 3px; background-color: #7BCBEF;'>"; } else if ($injured=='1') { echo "<div style='height: 100%; width: 3px; background-color: #cc1717;'>"; } } Calling the function: <?php echo teamcolor($color, $injured); ?>
  15. Thanks for that. That makes sense. I will try that. Cheers tebrown
  16. Thanks for that, it worked, but it now says my Column 'email' in where clause is ambiguous. I changed the select part but not sure if im doing it properly... Both tables contain id, email, salt, password. function getSalt($email) { $query = mysql_query("SELECT users.salt, players.salt FROM users, players JOIN email = '$email'") or die(mysql_error()); $row = mysql_fetch_assoc($query); return $row['salt']; } // This will check the username and password.JOIN tbl_section ON tbl_section.id = tbl_names.id function login($email, $password) { $query = mysql_query("SELECT users.email, players.email FROM users, players WHERE email = '$email' AND password = '$password'") or die(mysql_error()); return (mysql_result($query, 0)) ? true : false ; } Cheers
  17. Hey Guys, I originally had one table that was called users, which contained both the players and managers of my application. I now want to create separate tables for both managers and players. When i went to change my code from this: function login($email, $password) { $query = mysql_query("SELECT COUNT(id) FROM [b]users[/b] WHERE email = '$email' AND password = '$password'"); return (mysql_result($query, 0)) ? true : false ; } To this: function login($email, $password) { $query = mysql_query("SELECT COUNT(id) FROM [b]users, players[/b] WHERE email = '$email' AND password = '$password'"); return (mysql_result($query, 0)) ? true : false ; } It gave me a warning message: Warning: mysql_result() expects parameter 1 to be resource, boolean given in /Users/Tim/Sites/2012MP/functions.php on line 29 What have i done wrong here?
  18. I have just implemented this jquery plugin nanoScroller. My work to date: http://jsfiddle.net/tebrown/uXV7c/11/ The trouble i am having at the moment is creating more than one scroll bar within 3 tabs. The first tabs works fine, although when you go to the next tab, it doesn't show. Ideally i would like this to work within multiple tabs. Any help would be much appreciated. Cheers
  19. tebrown

    CSS line help

    Hey, In the link below, i have provided a jsFiddle document which shows the work I have currently got. What i am current have trouble with is that when i click 'Joe Bloggs' the hidden content appears yes, although i would like the purple line to be one whole line (instead of two). So basically, when the user clicks on 'Joe Bloggs' the purple line will automatically be adjust to the amount of content that will be there. The jsFiddle work: http://jsfiddle.net/7pUuD/ Any help much appreciated. Cheers.
  20. Ok i have made a couple of changes. http://jsfiddle.net/tebrown/87g2X/3/ Try open the result as far as you can, in my browser (localhost) it does now center, although i cant seem to scroll now?
  21. Hey Manhgiel, Also with the container div. I see you have put the container div around the middle section, i've been trying to play around with this so that the left and right navigations are also within this auto margin, not right up against the left and right sides. Ideally, i was aiming to have the middle section 650px (not %) with the 2 sides 250px. These would then stick to each side of the middle section. Cheers.
  22. Manhgiel, Thankyou so much. Really appreciate you taking your time to reply to this topic. I suppose i was rushing, hence the messy code. I need to prepare a few different variations of layouts for a project and the once i had selected the chosen layout i would have gone and re-coded it. Cheers
  23. I'm very confused. I understand your not here to for me but could you please elaborate on this?
  24. Hey, Below is the link to jsFiddle, which shows the code that I am currently stuck with. http://jsfiddle.net/tebrown/3KKZk/ What i am trying to do is make the border-bottom of each name go right to the edge of the div. I then want the scroll bar itself not to be right up against the right hand side (Need like a padding-right of about 5px). I don't think this is such a big deal, but every time i change something, it just messes with my code. I have attached an image of what i would like it to look like: http://i.imgur.com/MpoGC.png Thanks Guys!
  25. The page structure I have got is set out so that when a user scrolls the information in the middle will go up and the 2 sidebars will stay fixed and not move. In terms of the dropdown that we have been talking about, it should push this content down upon clicking the 'DROPDOWN' (.toggle1) class, which would then show the .hidden1 class and push down the 3 sections. If the user trys to scroll once this is active, the middle section will go behind both the .hidden1 and .toggle1 classes. In regards to your above reply, i think the reason they cant be pushed down is because the side divs are set to fixed. But they have to be in order for my layout to work. What do you mean by "you should include the drop down inside the 'dropdown' element at the very least.". Cheers
×
×
  • 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.