Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. ahh yer soz, forgot one add this } before ?>
  2. ok, so now this is the correct code <? $name = $_POST['name']; $email = $_POST['email']; $subject = $_POST['subject']; $message=$_POST['message']; $send = $_POST['Send']; if ($send == "Yes") { //Mail the comment /* Specify your SMTP Server, Port and Valid From Address */ ini_set("SMTP","mail.marklemmons.com"); ini_set("smtp_port","25"); ini_set("sendmail_from", "mark@marklemmons.com"); //Specify where you want them email to be sent $to = 'mark@marklemmons.com'; $message = "Name: ".$name."\n Email: ".$email."\n Subject:".$subject."\n Message: ".$message; $headers = 'From: '.$email. "\r\n" . 'Reply-To: '.$email. "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); if($_SERVER['HTTP_HOST'] == "www.marklemmons.com"); { //code here header("Location: http://www.marklemmomns.com"); } if($_SERVER['HTTP_HOST'] == "www.mobile.marklemmons.com"); { //code here header("Location: http://mobile.marklemmons.com"); } ?>
  3. any where in the php, then run the php and tell me what it says
  4. no sorry like this echo $_SERVER['HTTP_HOST']; this will tell you what the host is, then we will go from there
  5. hmm, ok, thanks for the help , i know someone who is setting up a linux server soon and he said i can install postfix on it, and i can use my current host to host the site.
  6. echo out the host and see what it says on each one
  7. Will i need to host the site on the server aswell or can i have it on a seperate server.
  8. yes the link should be in "site link" soz should of said
  9. just a side note, i am pretty sure you did not design the site as i have seen that CSS template before, so i wouldn't offer designing work when you just use free internet code.
  10. Ok, from what i know i will need to have a server where i can store all the emails and download them and store all the email addresses. But that about all i know. I have an old comp , but it wouldn't read of disk, and my internet is not good enough to run a server, but how would i set up and smtp server?
  11. Ok, i am making a mailing site a bit like hotmail, a few things i need to know. First how would i go about people setting up email accounts ?? I assume i would need my own server? Also how would i go about recieving email, what would i need to do this? So far all i have is a way to send email , using SMTP settings so they can be sent by anyone. Any help would be greatly apprieciated. Thanks, Blade
  12. if($_SERVER['HTTP_HOST'] == http://usersite.com) { //code here header("Location:wherever") } if($_SERVER['HTTP_HOST'] == http://mobile.usersite.com) { //code here header("Location:wherever") }
  13. Ok, thanks for the help and the example code. I have decided to go with an open source chat room. Ajax Chat.
  14. you could detect the host and then send based on that. the host would be mobile.site.com for the mobile one. to detect the host do $_SERVER['HTTP_HOST'];
  15. Well there is alot of code (i am coding). This is the code that is checking for the session <?php if(isset($_SESSION['logchat'])) { ?> <a href="?logout" id="nav">Logout</a> <?php } else { ?> <a href="login" id="log" onClick="return dropdownmenu(this, event, menu2, '70px')" onMouseout="delayhidemenu()">Login</a> <a id="log" href="">Register</a> <?php } ?> and the session is set by ajax (i think) and there is alot of code, but the session is there and is called logchat.
  16. will this always be updating though?? Or will they have to refresh the page?
  17. I have just started to learn AJAX and i am making a chatroom the problem i am having is on how to pull data from the php file and display the data inside another page, and how to show current data, as it will continuosly be changing. Any one know how to do this, the most i have been able to do so far is display data inside a input field from a php file.
  18. to protect from XSS (i think) use htmlspecialchars or htmlentities can't remeber which.soz.
  19. I think you should change this <?php error_reporting(E_ALL); //session name grab and page auth session_start(); $usernamesession = $_SESSION['Username']; if(!session_is_registered(myusername)){ header("location:index.html"); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Members Page</title> <style type="text/css"> <!-- body { background-color: #666666; } --> </style></head> <body> <p> <?php //Includes include 'Libary/opendb.php'; //Main query for user info $query = "SELECT Username, Age, Sex, Location, Picture FROM usersinfo WHERE Username ='$usernamesession'"; $result = mysql_query($query) or die(mysql_error()); //Place query data into variables $row = mysql_fetch_assoc($result) or die(mysql_error()); //changed// extract($row, EXTR_PREFIX_SAME, "prefix123"); ?> </p> <table width="257" border="1"> <tr> <td colspan="2"><img src="<?php echo $Picture; ?>"/></td> </tr> <tr> <td width="133">Username</td> <td width="108"><?php echo $row['Username']; ?> </td><!-- This should echo out like this, and not a variable like before as the variable wasn't set--> </tr> <tr> <td>Age:</td> <td><?php echo $Age; ?> </td> </tr> <tr> <td>Sex:</td> <td><?php echo $Sex; ?> </td> </tr> <tr> <td>Location:</td> <td><?php echo $Location; ?> </td> </tr> </table> <?php include 'Libary/closedb.php'; ?> <p> </p> </body> </html>
×
×
  • 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.