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

Reply

Join Date: Nov 2008
Posts: 37
Reputation: caps_lock is an unknown quantity at this point 
Solved Threads: 0
caps_lock caps_lock is offline Offline
Light Poster

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

 
0
  #1
Jun 3rd, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 224
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

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

 
0
  #2
Jun 3rd, 2009
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.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 37
Reputation: caps_lock is an unknown quantity at this point 
Solved Threads: 0
caps_lock caps_lock is offline Offline
Light Poster

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

 
0
  #3
Jun 3rd, 2009
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() ?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 224
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

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

 
0
  #4
Jun 3rd, 2009
I have no idea, show me your code.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 37
Reputation: caps_lock is an unknown quantity at this point 
Solved Threads: 0
caps_lock caps_lock is offline Offline
Light Poster

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

 
0
  #5
Jun 3rd, 2009
PHP
  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
  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
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 224
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

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

 
0
  #6
Jun 3rd, 2009
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.
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 37
Reputation: caps_lock is an unknown quantity at this point 
Solved Threads: 0
caps_lock caps_lock is offline Offline
Light Poster

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

 
0
  #7
Jun 3rd, 2009
i did try but sql was mainly involved from what i could gather


anyone else with anything constructive please do reply
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,402
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 224
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

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

 
0
  #8
Jun 3rd, 2009
Originally Posted by caps_lock View Post
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
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC