943,840 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 520
  • PHP RSS
Jun 3rd, 2009
0

Problem using mail() as the basis for a booking system

Expand Post »
Using php mail function allows a user of a wesbite to send email without opening up ther mail client, information such as subject message reply-to email address can be included.



With this could I also add fileds to send things such as booking time date, telephone number etc?

Can this go in the header fiels or something so that I can check it in my inbox



or does this require an sql table? i dont want to use one mainly becuase i havent made one befoer, and i want any reservation to be sent straight to my inbox

clarification?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
caps_lock is offline Offline
43 posts
since Nov 2008
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

You can put anything you want in the email. And you wouldn't need a SQL table unless you're storing information in some way.
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

thanks


so if i had say a html input field named "telephone"

the relavent php value for it would be $telephone?

would that go inside the $message() bit or $header() ?
Reputation Points: 10
Solved Threads: 0
Light Poster
caps_lock is offline Offline
43 posts
since Nov 2008
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

I have no idea, show me your code.
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

PHP
PHP Syntax (Toggle Plain Text)
  1.  
  2. <?php
  3. $email = $_REQUEST['email'] ;
  4. $subject = $_REQUEST['subject'] ;
  5. $message = $_REQUEST['message'] ;
  6.  
  7. mail( "contact@superdial.co.uk", $subject,
  8. $message, "From: $email" );
  9. header( "Location: http://superdial.co.uk/sent.htm" );
  10. ?>


FORM
PHP Syntax (Toggle Plain Text)
  1.  
  2. <form action="mail.php" method="post">
  3. Send a message to the superdial.co.uk inbox. Please complete all fields.
  4. <br><br>
  5. Reply-to email: <input type="text" name="email" size="25">
  6. <br><br>Subject:
  7. <select name="subject">
  8. <option value="Accessibility">Accessibility</option>
  9. <option value="Numbers">Access Numbers</option>
  10. <option value="Advertising">Advertising</option>
  11. <option value="Credit">Calling Credit</option>
  12. <option value="Careers">Careers</option>
  13. <option value="Other">Other</option>
  14. </select>
  15. <br><br>
  16. <textarea name="message" rows="15" cols="80">Enter your message here.</textarea>
  17. <br><br>
  18. <input type="submit" value="Send"></font>
  19. </form>



how could i include like a telepphone number to call a client back on?? i tried messing around by addid more form fields and changing lines in the php, but to no success
Reputation Points: 10
Solved Threads: 0
Light Poster
caps_lock is offline Offline
43 posts
since Nov 2008
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

http://lmgtfy.com/?q=php+mail+form
Really, google is your friend, use it, learn it, get to know it.
Last edited by ShawnCplus; Jun 3rd, 2009 at 4:53 pm.
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

i did try but sql was mainly involved from what i could gather


anyone else with anything constructive please do reply
Reputation Points: 10
Solved Threads: 0
Light Poster
caps_lock is offline Offline
43 posts
since Nov 2008
Jun 3rd, 2009
0

Re: Problem using mail() as the basis for a booking system

Click to Expand / Collapse  Quote originally posted by caps_lock ...
i did try but sql was mainly involved from what i could gather


anyone else with anything constructive please do reply
Then you're looking at the wrong things. Take a look at w3schools.com, read the tutorials for PHP
Sponsor
Reputation Points: 520
Solved Threads: 268
Code Monkey
ShawnCplus is offline Offline
1,564 posts
since Apr 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Help creating a PHP driven website
Next Thread in PHP Forum Timeline: get combobox value





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC