Dear,I have a input text tag that it named question.
Also i have a 2 radio bottum.
When i receive their value,I want to test that
question tag is empty or not.If empty,I again send to
client until client fill out this tag.
Can u solve my problem?


<?php
 function display_form()
  {
   echo "<form action=\"".$_SERVER['PHP_SELF']. "\"
method=\"post\">";
   echo "Your question<input type=\"text\"
name=\"question\" "><br />";
   echo "radio type <input type=\"radio\"
name=\"type_of_reply\" value=\"0\"><br />";
   echo "check box type <input type=\"radio\"
name=\"type_of_reply\" value=\"1\"><br />";
   echo "<input type=\"submit\">";
/*   if (empty($HTTP_POST_VARS['question']))
    {
     echo "please fill out question field.";
     display_form();
    }//end of if*/

  }//end of display_form func
 function test_var()
  {
   if (empty($HTTP_POST_VARS['question']))
    {
     echo "please fill out question field.";
     display_form();
    }//end of if

  }//end of func
 function insert_to_question()
  {
   display_form();
   while(empty($HTTP_POST_VARS['question']))
    test_var();
  }//end of insert_to_question func
 insert_to_question();
?>


=====
---------DIGITAL  SIGNATURE-------------------
///Mohsen Pahlevanzadeh////////
     Network administrator  & programmer     
      My home phone is: +98213810146          
My email address is                                  
          m_pahlevanzadeh at yahoo dot com               
My website is: http://webnegar.net            
----------------------------------------------------------------


        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to