•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 392,045 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,256 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 249 | Replies: 4
![]() |
Hi
all
I have a little issue with this php code. Below is the code
CODE: PHP
1.<?
2. include("../includes/common.php");
3. include("../path.php");
4.
5.$func_ary=array("dental_view","add_data","add_data2","mail_data","thanks");
6.if(fe($_REQUEST[act]))
7.{
8. $_REQUEST[act]($_REQUEST[msg]);
9. die();
10.}
11.dental_view();
12.die();
13.
14.
15.################################################
16.function dental_view()
17.{
18. //global $Server_View_Path;
19. $t=new Template("templates");
20. $t->set_file("MyFileHandle","dental_tourism_quote_step1.htm");
21. $t->set_var(array("SERVER_PATH"=>$Server_View_Path,
22. "act"=>"add_data",));
23. $t->parse("MyOutput","MyFileHandle");
24. $t->p("MyOutput");
25.}
26.###################################################
27.function add_data()
28.{
29. //global $Server_View_Path;
30.
31. $t=new Template("templates");
32. $t->set_file("MyFileHandle","dental_tourism_quote_step2.htm");
33. $f=""; $p="";
34. if($_REQUEST)
35. {
36. if($_REQUEST[dp])
37. {
38. $p=implode(",",$_REQUEST[dp]);
39. }
40. $_REQUEST[dp]=$p;
41.
42. if($_REQUEST[db])
43. {
44. $b=implode(",",$_REQUEST[db]);
45. }
46. $_REQUEST[db]=$b;
47. }
48.
49. foreach($_REQUEST as $k=>$v)
50. {if($k!="act")
51. $hidden.="<input type=\"hidden\" name=\"$k\" value=\"$v\" >";
52. }
53.
54. $t->set_var(array("hidden"=>$hidden,"SERVER_PATH"=>$Server_View_Path,
55. "act"=>"add_data2",));
56. $t->parse("MyOutput","MyFileHandle");
57. $t->p("MyOutput");
58.}
59.###########################################
60.function add_data2()
61.{
62. //global $Server_View_Path;
63. $t=new Template("templates");
64. $t->set_file("MyFileHandle","dental_tourism_quote_step3.htm");
65. if($_REQUEST)
66. {
67. if($_REQUEST[suffer])
68. {
69. $_REQUEST[suffer]=implode(",",$_REQUEST[suffer]);
70. }
71.
72. if($_REQUEST[undergone])
73. {
74. $_REQUEST[undergone]=implode(",",$_REQUEST[undergone]);
75. }
76. }
77.
78. foreach($_REQUEST as $k=>$v)
79. {
80. if($k!="act")
81. $hidden.="<input type=\"hidden\" name=\"$k\" value=\"$v\" >";
82. }
83. $t->set_var(array("hidden"=>$hidden,"SERVER_PATH"=>$Server_View_Path,
84. "act"=>"mail_data",));
85. $t->parse("MyOutput","MyFileHandle");
86. $t->p("MyOutput");
87.}
88.
89.
90.###############################################
91.function mail_data()
92.{
93.
94. //global $Server_View_Path;
95. $t=new Template("templates");
96. $t->set_file("MyFileHandle","mail.htm");
97.
98. if($_REQUEST)
99. {
100. foreach($_REQUEST as $k => $v)
101. {
102. $t->set_var(array( "$k" => $v,));
103. }
104. }
105. $t->parse("MyOutput","MyFileHandle");
106. $message=$t->get("MyOutput","MyFileHandle");
107. // send_mail("r",$_REQUEST[email_address],"rashmim","rashmi@cynets.com","Online appointment form submitted.",$message);
108. send_mail_new("CompleteDentalCare","info@completedentalcare.co.in","completedentalcare.co.in","Info@completedentalcare.co.in","Online appointment form submitted.",$message);
109. //send_mail_new("CompleteDentalCare",$_REQUEST[email_address],"completedentalcare.co.in","Info@completedentalcare.co.in","Online appointment form submitted.",$message);
110.
111. if(!get_row_con_info("dc_email","Where `dc_email`='$_REQUEST[email_address]'", "dc_email", $email))
112. {
113. $SQL="INSERT INTO `dc_email` (`dc_email_id` , `dc_email` ) VALUES ('', '$_REQUEST[email_address]')";
114. ei($SQL);
115. }
116. thanks();
117.}
118.#########################################
119.function thanks()
120.{
121. //global $Server_View_Path;
122. $t=new Template("templates");
123. $t->set_file("MyFileHandle","thanks.htm");
124. $t->set_var(array("SERVER_PATH"=>$Server_View_Path));
125. $t->parse("MyOutput","MyFileHandle");
126. $t->p("MyOutput");
127.}
128.?>
While executing this code . I get error.
The error is :
Fatal error: Call to undefined function fe() on line 6
plz anyone can help me as i'm not able to figure out this issue.
all
I have a little issue with this php code. Below is the code
CODE: PHP
1.<?
2. include("../includes/common.php");
3. include("../path.php");
4.
5.$func_ary=array("dental_view","add_data","add_data2","mail_data","thanks");
6.if(fe($_REQUEST[act]))
7.{
8. $_REQUEST[act]($_REQUEST[msg]);
9. die();
10.}
11.dental_view();
12.die();
13.
14.
15.################################################
16.function dental_view()
17.{
18. //global $Server_View_Path;
19. $t=new Template("templates");
20. $t->set_file("MyFileHandle","dental_tourism_quote_step1.htm");
21. $t->set_var(array("SERVER_PATH"=>$Server_View_Path,
22. "act"=>"add_data",));
23. $t->parse("MyOutput","MyFileHandle");
24. $t->p("MyOutput");
25.}
26.###################################################
27.function add_data()
28.{
29. //global $Server_View_Path;
30.
31. $t=new Template("templates");
32. $t->set_file("MyFileHandle","dental_tourism_quote_step2.htm");
33. $f=""; $p="";
34. if($_REQUEST)
35. {
36. if($_REQUEST[dp])
37. {
38. $p=implode(",",$_REQUEST[dp]);
39. }
40. $_REQUEST[dp]=$p;
41.
42. if($_REQUEST[db])
43. {
44. $b=implode(",",$_REQUEST[db]);
45. }
46. $_REQUEST[db]=$b;
47. }
48.
49. foreach($_REQUEST as $k=>$v)
50. {if($k!="act")
51. $hidden.="<input type=\"hidden\" name=\"$k\" value=\"$v\" >";
52. }
53.
54. $t->set_var(array("hidden"=>$hidden,"SERVER_PATH"=>$Server_View_Path,
55. "act"=>"add_data2",));
56. $t->parse("MyOutput","MyFileHandle");
57. $t->p("MyOutput");
58.}
59.###########################################
60.function add_data2()
61.{
62. //global $Server_View_Path;
63. $t=new Template("templates");
64. $t->set_file("MyFileHandle","dental_tourism_quote_step3.htm");
65. if($_REQUEST)
66. {
67. if($_REQUEST[suffer])
68. {
69. $_REQUEST[suffer]=implode(",",$_REQUEST[suffer]);
70. }
71.
72. if($_REQUEST[undergone])
73. {
74. $_REQUEST[undergone]=implode(",",$_REQUEST[undergone]);
75. }
76. }
77.
78. foreach($_REQUEST as $k=>$v)
79. {
80. if($k!="act")
81. $hidden.="<input type=\"hidden\" name=\"$k\" value=\"$v\" >";
82. }
83. $t->set_var(array("hidden"=>$hidden,"SERVER_PATH"=>$Server_View_Path,
84. "act"=>"mail_data",));
85. $t->parse("MyOutput","MyFileHandle");
86. $t->p("MyOutput");
87.}
88.
89.
90.###############################################
91.function mail_data()
92.{
93.
94. //global $Server_View_Path;
95. $t=new Template("templates");
96. $t->set_file("MyFileHandle","mail.htm");
97.
98. if($_REQUEST)
99. {
100. foreach($_REQUEST as $k => $v)
101. {
102. $t->set_var(array( "$k" => $v,));
103. }
104. }
105. $t->parse("MyOutput","MyFileHandle");
106. $message=$t->get("MyOutput","MyFileHandle");
107. // send_mail("r",$_REQUEST[email_address],"rashmim","rashmi@cynets.com","Online appointment form submitted.",$message);
108. send_mail_new("CompleteDentalCare","info@completedentalcare.co.in","completedentalcare.co.in","Info@completedentalcare.co.in","Online appointment form submitted.",$message);
109. //send_mail_new("CompleteDentalCare",$_REQUEST[email_address],"completedentalcare.co.in","Info@completedentalcare.co.in","Online appointment form submitted.",$message);
110.
111. if(!get_row_con_info("dc_email","Where `dc_email`='$_REQUEST[email_address]'", "dc_email", $email))
112. {
113. $SQL="INSERT INTO `dc_email` (`dc_email_id` , `dc_email` ) VALUES ('', '$_REQUEST[email_address]')";
114. ei($SQL);
115. }
116. thanks();
117.}
118.#########################################
119.function thanks()
120.{
121. //global $Server_View_Path;
122. $t=new Template("templates");
123. $t->set_file("MyFileHandle","thanks.htm");
124. $t->set_var(array("SERVER_PATH"=>$Server_View_Path));
125. $t->parse("MyOutput","MyFileHandle");
126. $t->p("MyOutput");
127.}
128.?>
While executing this code . I get error.
The error is :
Fatal error: Call to undefined function fe() on line 6
plz anyone can help me as i'm not able to figure out this issue.
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 238
Do you have a function called fe ? If yes, is it in a different file ? If no, what does mean ?
•
•
•
•
if(fe($_REQUEST[act]))
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 503
Reputation:
Rep Power: 3
Solved Threads: 67
it means that it cannot locate the fe() in your script.try to include the file where the function resides.
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
http://ryantetek.wordpress.com
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,879
Reputation:
Rep Power: 32
Solved Threads: 107
Nicky: in the future, wrap your code in [code=php] and [/code] tags to have it automatically add line numbers and syntax highlight your code.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation:
Rep Power: 2
Solved Threads: 10
What does the fe() function do? Have you defined it in another file that you do an include on?
If you find my post useful please add to my reputation!! Thanks!
ajtrichards web solutions
http://www.ajtrichards.co.uk
ajtrichards web solutions
http://www.ajtrichards.co.uk
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Lovely error (PHP)
- T_STRING error? i cant find it (PHP)
- how to call Stored Procedure in mysql by php (PHP)
- Fatal Error (PHP)
- Call to undefined function mysql_connect() (PHP)
- php mysql help (PHP)
- Php-nuke and MySQL trouble (PHP)
- No page header and footer when printing a web page (JavaScript / DHTML / AJAX)
- Access PostgreSQL from PHP (PHP)
Other Threads in the PHP Forum
- Previous Thread: disable textbox
- Next Thread: getting X, Y values of certain text in string on image



Linear Mode