Everything posted by 4487rathb
-
CMS or not?
Do I create the whole website first then use the CMS or install the CMS and create the website?
-
CMS or not?
He will be updating it and changing it himself though, so he will be touching the CMS if there is one there.
-
CMS or not?
Hi! Basically, I have made some websites before, but I have never used a CMS. I have a fellow soldier friend who is getting out of the Army over the next few months and he is going to be starting up his own lock smith company. I offered to make him a website, which is fine, no problem. My friend has no technical knowledge or any web design knowledge at all, so updating it himself using the raw code is a big no no. My problem is I have never used a CMS before, so I do not fully know what to do with them. Do I have to change my code to suit the CMS? Does the CMS override your styles and layouts to their own? Will a CMS allow him to update his website himself, and is it the best thing to use? Also what is best? Should I tailor make a CMS myself to suit his website, or would it be best to use an existing CMS such as WordPress or Joomla etc.? Thanks.
- PHP Contact Form
-
PHP Contact Form
Okay, thanks. But how does that automatically mail it to the different mailboxes? To me that looks like it just tells me where the person wants it to go, just like it tells me what their name is, or their message; not the actual directing of the email to the different mailboxes.
-
PHP Contact Form
Okay mate, you have completely lost me now haha! I understand what you are saying, but I am new to PHP. Thanks anyway.
-
PHP Contact Form
Okay, it won't work. Here is my original code: <!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="Refresh" content="5;url=http://www.richardrathbone.co.uk/contact.html" /> <link rel="stylesheet" href="css/master.css" type="text/css" media="all" /> </head> <body> <div class="container"> <div class="header"> <h1><img src="images/rathbone.png" alt="Rathbone Web Design" /></h1><a class= "structural" href="#content">Skip to main content</a> </div> </div> <div class="content-container"> <div class="section-nav"> <h3 class="structural">Section navigation</h3> </div> <div class="content gutter"> <a name="content" id="content"></a> <?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "contact@richardrathbone.co.uk"; $email_subject = "General Contact"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please press back and fix these errors.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $first_name = $_POST['first_name']; // required $last_name = $_POST['last_name']; // required $email_from = $_POST['email']; // required $telephone = $_POST['telephone']; // not required $comments = $_POST['comments']; // required $error_message = ""; $email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$"; if(!eregi($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "^[a-z .'-]+$"; if(!eregi($string_exp,$first_name)) { $error_message .= 'The First Name you entered does not appear to be valid.<br />'; } if(!eregi($string_exp,$last_name)) { $error_message .= 'The Last Name you entered does not appear to be valid.<br />'; } if(strlen($comments) < 2) { $error_message .= 'The Comments you entered do not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "First Name: ".clean_string($first_name)."\n"; $email_message .= "Last Name: ".clean_string($last_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> <h1 style="font-family: comic sans ms; color: #09f; font-size: 15px;"> Thank you for getting in touch. I will reply as soon as possible.</h1> </div> </div> </div> </body> <? } ?> </html> HTML: <form name="contactform" method="post" action="send_form_email.php" id= "contactform"> <fieldset> <!-- Your Name --> <div> <label for="first_name">First name <abbr title= "Required field">*</abbr></label> <input type="text" name="first_name" id= "name" /> </div> <div> <label for="last_name">Last name <abbr title= "Required field">*</abbr></label> <input type="text" name="last_name" id= "sname" /> </div> <!-- Email --> <div> <label for="email">Your email address <abbr title= "Required field">*</abbr></label> <input type="text" name="email" id= "email" /> </div> <!-- Your Number --> <div> <label for="telephone">Telephone</label> <input type="text" name= "telephone" id="number" /> </div> <!-- Subject --> <div> <label for="subject">Subject</label> <select name="subject"> <option value="#">Please choose</option> <option value="complaints@richardrathbone.co.uk">Complaints</option> <option value="fianance@richardrathbone.co.uk">Finance</option> <option value="General@richardrathbone.co.uk">General Comments</option> <option value="quotes@richardrathbone.co.uk">Quotes</option> <option value="suggestions@richardrathbone.co.uk">Suggestions</option> <option value="support@richardrathbone.co.uk">Support</option> </select> </div> <!-- Comments --> <div> <label for="comments">Your comments <abbr title= "Required field">*</abbr></label> <textarea name="comments" id="comment" rows="10" cols="50"> </textarea> </div> <!-- Controls --> <div class="controls"> <input id="submit" name="submit" type="submit" value="Submit Feedback" /> </div> </fieldset> </form>
-
PHP Contact Form
Would this be the part you mean? // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?>
-
PHP Contact Form
I don't understand how you do that sorry. Can you explain a bit more please? Thanks.
-
PHP Contact Form
So all I have to do is enter those two snippets of code and it will work?
-
PHP Contact Form
Hello! It's me again... I have looked everywhere, but I cannot seem to work this out at all! Okay, so I have my PHP contact form which works just fine, except I cannot work out how to get it to send to different mailboxes dependent on the subject. For example, the user fills out their name, email etc.. Then chooses what subject the matter is about. I would like the script to automatically send to different mailboxes depending on what is chosen so if 'Finance' is chosen, it will send to finance@something.com, if 'general' is chosen it will send to general@something.com. I am not 100% sure this can be done, but apparently it can. Any help at all would be much appreciated! Thank you.
-
PHP Secure User Area
You should come work for me!! I can pay you in beer? Haha thanks again.
-
PHP Secure User Area
Ah right, that explains a lot then! I knew you could not normally access it, but if php can then great! Thanks, you are a great help.
-
PHP Secure User Area
Wow great thank you! Could you maybe show me some code possibly to help with referring indirectly to files? Thanks.
-
PHP Secure User Area
Okay thank you everybody.
-
PHP Secure User Area
Are you able to help me out with any code? Also would I have to manually edit the table for every new user I create, or can I create an HTML form which only I have access to which I can use to create accounts which add to the table automatically with MySQL?
-
PHP Secure User Area
Information is information, it is sensitive regardless. It discloses information about companies and businesses. And it would be Word, Excel, Pdfs.
-
Host Papa
I was with HostPapa, but they charge stupidly more than JustHost, and JustHost seems a lot better, plus for the same plan, I get more and for less! Http://www.justhost.com
-
PHP Secure User Area
That covers uploading yes, but how do I upload it so only that individual can see it and download/view it online? How do I make it secure and appear as a link for them to see? Thanks.
-
PHP Secure User Area
Hi, I am the Web Admin for my old CSM's new company and on his website he would like to have a feature where his clients can login with provided credentials, required to change their password at login, and can view personal reports uploaded by myself or themselves. The area cannot be shared, nor can it be accessible by others. I have a basic understanding of PHP and MYSQL, but I can pretty much make the login/change password and logout feature, it is just the report uploading for that user I do not know how to do. Any help would be appreciated. If you would prefer, email a reply to my email address please: richy.roo@hotmail.co.uk. Thank you. Other info: Webhost is Justhost.com MYSQL enabled. PHP Enabled. No restrictions to DBs.