Jump to content

Akenatehm

Members
  • Posts

    262
  • Joined

  • Last visited

    Never

Everything posted by Akenatehm

  1. I will post it here and help you adjust it. I can't really be bothered emailing and I can actually help you edit it easily on here. Here it is: <?php /* This is the if statement finding if the user clicks on the submit button */ if(isset($_POST['submit'])) { /* The input of your fields are being set to variables here. When editing, make sure you change the name of the 'name' and 'email' and 'description' fields and I also recommend you change the name of the variables to the name of your input field so the code is easier to understand for you and anyone else looking at it. NOTE: The 'name' , 'email' , 'description' fields are the IDs given by you to each field in your form, these must match those IDs.*/ $name=$_POST['name']; $email=$_POST['email']; $description=$_POST['description']; /* If user doesnt put in a name then it says on the screen "You did not enter a Name"*/ if(strlen($name)<1) { print "You did not enter a Name."; } /* If they did then it is also checking if they put an email in and doing the same thing if they haven't.*/ else if(strlen($email)<1) { print "You did not enter an Email."; } /* Same, here, its checking for a description.*/ else if(strlen($description)<1) { print "You did not enter a Description."; } /* If they have put all the information required in than it continues. */ else /* Here, I am defining what the variables are. In the variable $message I have exactly how I want it layed out and what information I want to come up in the email.*/ { $subject = "Contact Enquiry From: '$email'"; $message = "Name: '$name'\n Email: '$email'\n Description: '$description;'\n"; $from = "From: '$email' \n"; /* Here, I am actually sending the email. change 'youremai@yourhost.com to your email address. With the variables $subject, $message and $from I am defining what is in the message from what I already have defined above. */ mail ("youremail@yourhost.com" , $subject, $message, $from); /* I am defining an auto redirect to another page in the header() function.*/ header("Location:http://www.yourhost.com/thankyou.html"); } } ?>
  2. Hmm I can't really help to from my iPod touch. If your problem hasn't been fixed by tomorrow than I will be more than willing to help, but it is he earliest I can get on. Sorry and good luck.
  3. Dam. I just finished making one on the computer. I can't get on though. I'll post it in parts on here of what I can remember. Dam. I just tried and it seems I am missing half the symbols I need. If you havnt been helped by tomorrow then I wilL give you the whole script. And help you edit it too. Good luck!
  4. I would be able to help you better if I were on my computer but at the moment I am on my iPod touch. It sounds like the problem lies in the output of your process.php script. Are you trying to display the data on the process.php file or the index.php file
  5. Maybe if you give more details about what fields you want, how you want it to be processed. (whether or not through a database or just stored on the PHP script). What variables you are using etc. We might be better equipped to help you.
  6. Corbin fixed the redirect problem. Thanks. Now just the formatting part.
  7. Hey Guys. I need to make a few adjustments to my php contact form script. I need it to redirect to a thank you page and when i send email it comes formatted wierdly. I want each topic on a new line. But it has random spaces between them. Here is the area of code for that: $subject = "Contact Enquiry From: '$email'"; $message = "Name: '$name' \n Email: '$email' \n Description: '$description;' \n"; $from = "From: '$email' \n"; mail ("codycarnachan@kauridigital.com" , $subject, $message, $from);
  8. Is there a way to make it auto redirect somewhere?
  9. Don't worry, I fixed it myself. Awesome! Thanks for Making me Look at it Myself.
  10. I have no idea what it is. I barely know any PHP and I have barely only just started.
  11. Whats the difference between php and PHP and what do you mean by the second comment, you didn't change anything..
  12. Hey Guys, I am trying to make a contact form email.php script. Here is the error: Here is the code: <?PHP if(isset($_POST['submit'])) { $name=$_POST['name']; $email=$_POST['email']; $description=$_POST['description']; if(strlen($name)<1) { print "You did not enter a Name."; } else if(strlen($email)<1) { print "You did not enter a password."; } else if(strlen($description)<1) { print "You did not enter a Description."; } else { $subject = "Contact Enquiry From:" '$email'; $message = "Name: '$name' \n Email: '$email' \n Description: '$description;' \n"; $from = "From: '$email' \n"; mail ("codycarnachan@kauridigital.com" , $subject, $message, $from); } } ?>
  13. Ok. So how do you suggest I lay the table out, what field types? Going to have following fields: chatid, username, date
  14. I did change it before. Don't know why it was still showing that it hadn't. Here it is: $insert = "INSERT INTO `users` (username,password,email) VALUES ('".mysql_real_escape_string ($username)."','".mysql_real_escape_string ($password)."','".mysql_real_escape_string ($email)."','".mysql_real_escape_string; and it shows that error.
  15. But wouldn't that create huge server load if there are say.... 100 conversations at once all connecting to the same database?
  16. <?PHP include "connect.php"; // Checks the database for a user with a particular user name $check = mysql_query("select ID from users where username='$username' limit 1;"); // get a row count of the number of rows found if(mysql_num_rows($check) == 1) { echo "Username Already In Use."; } else { if(isset($_POST['submit'])) { $username=$_POST['username']; $password=$_POST['password']; $email=$_POST['email']; if(strlen($username)<1) { print "You did not enter a username."; } else if(strlen($password)<1) { print "You did not enter a password."; } else { $insert = "INSERT INTO `users` (username,password,email) VALUES ('".mysql_real_escape_string ($username)."','".mysql_real_escape_string ($password)."','".mysql_real_escape_string ($email)."','".mysql_real_escape_string; mysql_query($insert) or die("Could not insert comment" . mysql_error()); echo "User Added. <a href=\"home.html\">Click here</a> To Go Home."; } } } ?>
  17. We are creating an instant messaging client. This would be creating the chat rooms, where all the conversations are stored. Messages and Senders will be listed in here. Here is how I mean: chatroom1 chatroom2 chatroom3 to chatroom40 etc etc
  18. I fixed that and now I get: and Line 2 is blank...
  19. Hey Guys, What I need to do is create a table that has a name auto incrementing. For example: Creates Table "table1" Creates Table "table2" Creates Table "table3" The script is querying the database to see what the next number is OR Another Script Somewhere Else Tries to Create "table2" It finds out that it already exists. and then it keeps going up the numbers. "table4" etc. till it finds one that isn't taken up. Any help will be greatly appreciated.
×
×
  • 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.