943,907 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2395
  • PHP RSS
You are currently viewing page 6 of this multi-page discussion thread; Jump to the first page
Mar 1st, 2009
0

Re: PHP

that above code doesnot working,,,

tell me any simple method so that it will display Your details , your business title ....
Reputation Points: 6
Solved Threads: 0
Junior Poster in Training
rohnni is offline Offline
58 posts
since Feb 2009
Mar 1st, 2009
0

Re: PHP

any idea? how to breakup the page?
Reputation Points: 6
Solved Threads: 0
Junior Poster in Training
rohnni is offline Offline
58 posts
since Feb 2009
Mar 1st, 2009
0

Re: PHP

Click to Expand / Collapse  Quote originally posted by rohnni ...
that above code doesnot working,,,

tell me any simple method so that it will display Your details , your business title ....
Well that probably means that a- you haven't placed the foreach loop in my previous post in all 5 files or b- you did not use the html field names inside the session array or c- you did not put session_start() at the beginning of all 5 files.

If you want a simpler method then first you may want to remove the foreach loop mentioned in my previous post from all your pages. Then place session_start(); at the top of all of your pages if it does not allready exist. After that place the following code on the next line below session start on page 2:
php Syntax (Toggle Plain Text)
  1. foreach($_POST AS $keyzz => $valzz) {
  2. $_SESSION['aa1'][$keyzz]=$valzz;
  3. }
Then line below session start on page 3:
php Syntax (Toggle Plain Text)
  1. foreach($_POST AS $keyzz => $valzz) {
  2. $_SESSION['aa2'][$keyzz]=$valzz;
  3. }
Then line below session start on page 4:
php Syntax (Toggle Plain Text)
  1. foreach($_POST AS $keyzz => $valzz) {
  2. $_SESSION['aa3'][$keyzz]=$valzz;
  3. }
Then line below session start on page 5
php Syntax (Toggle Plain Text)
  1. foreach($_POST AS $keyzz => $valzz) {
  2. $_SESSION['aa4'][$keyzz]=$valzz;
  3. }
In case you are wondering, page 1 is the first form page and page 2 is second page which has had $_POST submitted to it untill page 5 which display or whatever the results while receiving the posts. Now for the message, the following will do the trick:
php Syntax (Toggle Plain Text)
  1. $body="title1 \n";
  2. foreach($_SESSION['aa1'] AS $keyaa => $valaa) {
  3. $body.="$keyaa : $valueaa \n";
  4. }
  5. unset($keyaa);
  6. unset($valaa);
  7. $body="title2 \n";
  8. foreach($_SESSION['aa2'] AS $keyaa => $valaa) {
  9. $body.="$keyaa : $valueaa \n";
  10. }
  11. unset($keyaa);
  12. unset($valaa);
  13. $body="title3 \n";
  14. foreach($_SESSION['aa3'] AS $keyaa => $valaa) {
  15. $body.="$keyaa : $valueaa \n";
  16. }
  17. unset($keyaa);
  18. unset($valaa);
  19. $body="title4 \n";
  20. foreach($_SESSION['aa4'] AS $keyaa => $valaa) {
  21. $body.="$keyaa : $valueaa \n";
  22. }
Sponsor
Featured Poster
Reputation Points: 410
Solved Threads: 258
Occupation: Genius
cwarn23 is offline Offline
3,004 posts
since Sep 2007
Mar 1st, 2009
0

Re: PHP

Thanks... :-))
Reputation Points: 6
Solved Threads: 0
Junior Poster in Training
rohnni is offline Offline
58 posts
since Feb 2009

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: Contact form
Next Thread in PHP Forum Timeline: Pizza ordering system





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


Follow us on Twitter


© 2011 DaniWeb® LLC