PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 11th, 2004, 01:56 AM
southeastweb southeastweb is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 southeastweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question PHP question?

Hello everyone, thanks for reading my question. I am fairly new to PHP. I've built several mail forms and basic dummy apps just for testing purposes, so I am by no means a pro. I recently ran into a situation where I created:

1st Form page which collects info and echos to next page for verification
2nd Verify page opens, displaying all info with submit button

What I am trying to do is take that echoed info and then, once previewed by the user, they can choose to submit it if ok. But I am confused how this will work/or how I can make it work because my knowledge at this point doesn't permit a way to take the info being varified, turn it in to variables, and then allow it to send via mail() (I already have this working, it's just passsing the variables from the varification page I having trouble with), opening a new .php varified "Ok" page. Or if you know a better way, I am totally open for any suggestions, I just want to learn PHP!

If you don't understand my question, which I know may be very possible, you can email me at contact@southeastwebsites.com . Any info or help is highly apprechiated! Thanks!

Here is the code from myverify page:

<?php


$numofpages = $HTTP_POST_VARS['numofpages'];
$numofart = $HTTP_POST_VARS['numofart'];
$numofforms = $HTTP_POST_VARS['numofforms'];
$generalsitedesign = $HTTP_POST_VARS['generalsitedesign'];
$anyotherinfo = $HTTP_POST_VARS['anyotherinfo'];
$firstname = $HTTP_POST_VARS['firstname'];
$lastname = $HTTP_POST_VARS['lastname'];
$emailname = $_POST['emailname'];
$phonename = $HTTP_POST_VARS['phonename'];
$calltime = $HTTP_POST_VARS['calltime'];
$lastinfo = $HTTP_POST_VARS['lastinfo'];

echo '<p>Is this quote request correct?</p>';
echo $numofpages.' Pages:<br />';
echo $numofart.' Images:<br />';
echo $numofforms.' Forms:<br />';
echo $generalsitedesign.' General design<br />';

echo "Any other info about site: $anyotherinfo<br />";

echo '<p>Is your contact info correct?:</p>';
echo "Name: $firstname $lastname<br />";
echo "Email: $emailname<br />";
echo "Phone: $phonename<br />";
echo "Best time to call: $calltime<br />";
echo "Additional info: $lastinfo<br />";

$mail_body = "\nFirst Name: ".$firstname;
$mail_body .= "\nLast Name: ".$lastname;
$mail_body .= "\nEmail: ".$emailname;
$mail_body .= "\nPhone#: ".$phonename;
$mail_body .= "\nBest Time to Call: ".$calltime;
$mail_body .= "\nMore Info: ".$lastinfo;
$mail_body .= "\nNumber of Pages: ".$numofpages;
$mail_body .= "\nNumber of Art: ".$numofart;
$mail_body .= "\nNumber of Forms: ".$numofforms;
$mail_body .= "\nGeneral Site Design: ".$generalsitedesign;
$mail_body .= "\nAny Other Info Re: Site: ".$anyotherinfo;
$mail_to = "drumshop@drummersgalaxy.com";
$mail_subject = "SEW Quote Request Approval";
mail($mail_to, $mail_subject, $mail_body,"From: ".$_POST['emailname']);

echo "<center><p>Thank you. We'll be contacting you shortly.</center></p>";
?>

Reply With Quote
  #2  
Old March 11th, 2004, 06:41 AM
Spongy's Avatar
Spongy Spongy is offline
Alternately High
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Hilversum, Netherlands
Posts: 223 Spongy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 56 m 41 sec
Reputation Power: 5
Send a message via MSN to Spongy
Do you have some code already? It would be nice if you posted it. It's not to hard to do such a thing, though. But please show some code.
__________________
Work to live, don't live to work

Reply With Quote
  #3  
Old March 11th, 2004, 05:50 PM
southeastweb southeastweb is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 southeastweb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP code

Here it is.
Quote:
Originally Posted by Spongy
Do you have some code already? It would be nice if you posted it. It's not to hard to do such a thing, though. But please show some code.

Reply With Quote
  #4  
Old March 12th, 2004, 04:59 AM
Spongy's Avatar
Spongy Spongy is offline
Alternately High
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Hilversum, Netherlands
Posts: 223 Spongy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 56 m 41 sec
Reputation Power: 5
Send a message via MSN to Spongy
Make some hidden input fields with the values from your variables. Place a submit button. You can set the action of the form to php_self, check with an if-statement if the button is pressed and mail / save the data.
And I couldn't help noticing that you use $HTTP_POST_VARS everywhere, except for the email of the user. There will be no problem with it, but try to make your code using one method. You make it more clearer for yourself.

Hope this would help you.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP question?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway