Important alert: (current site time 7/15/2013 11:07:24 AM EDT)
 

VB icon

Guest Book for Your WAP Site! (Complete)

Email
Submitted on: 9/21/2003 9:12:37 AM
By: whizCOMPUTING  
Level: Advanced
User Rating: Unrated
Compatibility: PHP 3.0, PHP 4.0
Views: 21000
author picture
(About the author)
 
     You can Use this Code to Add a new Thing in your WAP site. Guest Book!!!
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
// for :Guest Book for Your WAP Site! (Complete)
//**************************************
Please Ask before Com Use
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
//**************************************
// Name: Guest Book for Your WAP Site! (Complete)
// Description:You can Use this Code to Add a new Thing in your WAP site.
Guest Book!!!
// By: whizCOMPUTING
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=1136&lngWId=8//for details.//**************************************

WAP Guest Book
Written in PHP
By Amanat Ali Gohar
Create a WML Form to Collect user's comments, name and email address. Save following code as Guestbook.wml
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd" >
<wml>
<card>
<p align="center"><b>Guest Book!</b></p><br/>
Your Name : <input type="text" name="user_name"/><br/>
Your Email: <input type="text" name="user_email"/><br/>
Your Comments : <input type="text" name="user_comments"/><br/>
<anchor>
<go href="save_comments.php" method="post">
<postfield name="user_name" value="$user_name"/>
<postfield name="user_email" value="$user_email"/>
<postfield name="user_commetns" value="$user_comments"/>
</go>
Please Click Here To SEND
</anchor>
</card>
 </wml> 
</FONT><I> And now create an-other file. This file contains PHP code to Create text file (user_comments.txt) in C:\. User_comments.txt file will hold all data submit by Users</I>. 
<I> (Note : Save following file as save_comments.php and don't forget to save this both files in same directory) 
   
</I><FONT FACE="Courier New" COLOR="#008000"> /* Before Commercial use don't forget to ask me yadish_sahar@hotmail.com</FONT><FONT FACE="Courier New" COLOR="#008000"> */ 
 <? header("Content-type:text/vnd.wap.wml"); 
 if (isset($user_name) and isset($user_email) 
 and isset($user_comments) and ($user_name and $user_email and $user_comments != "")) 
 { 
 $file_name="c:\user_comments.txt"; 
 $file_data = fopen($file_name ,"a"); 
 $data_to_write = "User Name is :".$user_name."\n". 
 "Email Address is :".$user_email."\n". 
 "He/She Submit this Comments :".$user_comments."\n". 
 "*************************\n\n"; 
 fwrite($file_data,$data_to_write); 
 fclose($file_data); 
 echo "<?xml version=\"1.0\"?> 
 <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\" > 
 <wml> 
 <card> 
 <p align=\"center\"><b>Thank You!</b></p><br/> 
 Your Comments is Saved. Thank you very much again 
 </card></wml>"; 
 } 
 else 
 { 
 Echo "<?xml version=\"1.0\"?> 
 <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\" > 
 <wml> 
 <card> 
 <p><b>Some thing is Wrong with Your Form Submission! </b> 
 </p> 
 </card></wml>"; 
 } 
 ?>


Other 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
9/24/2003 2:05:12 PMRobert Kaltenbach

I've tried it but there was an error saying:
Error. Ln 6, Col 13 No character data is allowed by content model

Please help me!
(If this comment was disrespectful, please report it.)

 
9/27/2003 2:43:37 AMAmanat Ali

Dear, I cant understand whats happen with you, so please send me Your Error's Capture Screen ,
(If this comment was disrespectful, please report it.)

 
1/9/2004 1:23:43 AM


(If this comment was disrespectful, please report it.)

 
1/9/2004 1:24:54 AM

"copy-and-paste friendly version of this code!" converts < and > to < and > (at least in Mozilla 1.4)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.