B
brilliants

  • Jan 22, 2005
  • Joined Oct 12, 2002
  • thanks allllooot... it did work just perfectly ;-)

    • iam working on it, as i have lot of option boxes in one page

      :-) thanks indeed

      • hi alllll

        i have a form that i want to email it, the form is working except that iam not able to get the reuslts of some input types like radio, select, and checkboxes

        other than that,everything seems to be fine, im getting the form through my email with the submitted results.

        in my code for select boxes

        <? echo "<input type=select name=grade>
        <option>-----</option>
        <option>exellent</option>
        <option>good</option>
        <option>bad</option>";
        ?>

        HOW can i set SELECTED to the Slected option?

        <?echo "Gender <input type=radio name=gener value=M> <input type=radio name=gender value=F>";
        ?>

        HOW can i set CHECKED to the checked option?

        thanks indeeeeeeeeed :o

        • thanks in zillions

          you guys been a great help, without it, my form, would had take some other end :o

          thanks alloot..

          it says ""The Knowlede is the only thing that grows when sharing with others

          • it does!

            how do i eliminate it (submit button)

            thanks indeeeeeeeeeeeeeeeed

            • thats awsome :eek:

              Just out of curiosity, are you getting the submit variable text "Submit!" included in the email bodies?

              mmm .. i dont think so! , am i passing it too!

              • thanks for the reply ..

                but what if want to format the $name variable and type it in Bold format and the $age variable in Italic ... any way out ??? :bemused:

                • i have form mail, when submitted i get the reuslts without any format, the code

                  <form method=post action="<?PHP_SELF?>">
                  <input type=text name="Name">
                  <input type=text name="Age">
                  <input type=submit name="Submit" value="Submit">
                  </form>
                  
                  if($Submit)
                  {
                   //This will post all form values
                   while (list($key,$value) = each($HTTP_POST_VARS))
                   {
                   $msg .= "$key: $value\n"; //assigning to msg!
                   }
                  mail("someone@somewhere","Test Subject","$msg\n",
                   "me@somewhere.com") or die("mail not functioned!");
                   echo "<h2>Thank you</h2><br>Thank you .";
                  }
                  else
                  {
                  echo "$successMsg";
                  }//end else Submit
                  ?>
                  

                  the form does work proper, but the email result im getting not formatted to what i need

                  so, how can i format it?, i want to capture variables $name and $age and present it nicely. is there a way to format the result in HTML , so that i can present the results in HTML ?

                  thanks indeeeeeeeeeeed 😕

                  • thanks allot..

                    actually i have a php file that to be included ..

                    i will search on ob_start() function

                    thanks once again

                    • hiiii

                      I want to send an email as HTML with a given inclding page

                      the script goes like this

                      <?
                      /* recipients */
                      $to  = "someone@somewhere.com";
                      
                      /* subject */
                      $subject="The subject";
                      
                      $headers  = "MIME-Version: 1.0\r\n";
                      $headers .= "Content-type: text/html; charset=windows-1256\r\n";
                      $headers .= "To: SSS. KSK <sss@ksk.com>\r\n";
                      $headers .= "From: My Web Site <webmaster@mysite.com>\r\n";
                      
                      /* here i  want to include a html/php page rather than typing it again from an existing one */
                      
                      $message="include(\"myincludeingpage.php\")";
                      
                      mail($to, $subject, $message, $headers) or die("mail not functioned!");
                      echo "<h2>Thank you</h2><br>Thank you";
                      ?>
                      

                      The mail does Work, but the including page does not appear,
                      what i receive in the email is in the message:

                      include(\"myincludeingpage.php\") :eek: what to do about it ???

                      • okie...

                        i tried out this, the link gets modified, but it does NOT get passed in the URL

                        <input type="submit" name="sqltype" value="New" onclick="doNew()">

                        javascript ....

                        function doNew()
                        {
                        var loc=window.location;
                        location.replace(loc+'&ID=&mode=new');
                        alert(loc+'mode=new');
                        }

                        • guess i need bit more elaboration on that please, maybe with an eg. ;-)

                          • guess thats what im searchin for, hope someone helps me out

                            • i know there some other alternatives, even by <input type="image"> but really i do want it by buttons or submit buttons for one reason ie. they could be enabled/disabled

                              • i might had phrased the Title wrongly, nyway

                                i have a simple form that does ADD / Update / Delete

                                it is working somehow, but, not to what i expect!

                                <form name="forms" method=post action="<?$PHP_SELF?>">
                                ..
                                ..
                                some input fielsds..
                                
                                <input type="submit" name="sqltype" value="NEW">
                                <input type="submit" name="sqltype" value="Update">
                                <input type="submit" name="sqltype" onclick="DeleteRecord()" value="Delete">

                                the form will take action upon the sqltype NEW / Insert / Delete

                                the problem is when clicking on the NEW button the form does not work bcs there are two vairables should be passed to the URL
                                ie. inc=$inc&mode=$new
                                this could be done by simply

                                echo "<a href=\"$PHP_SELF?inc=$inc&mode=new\">New";?>

                                how can i pass it with the the NEW Submit button ... it is possible with hidden fields but.. the $mode value shoud be changed depend on all the submit buttons... ??

                                • it worked .. just perfect ....& its as simple as it is ...

                                  thanks for the very great help..

                                  now i can streach my hans on my <table> 😉

                                  i new i was never mistaken whome to ask!

                                  you've made my day... thanks once again..

                                  • a big hi to all the developers out there...

                                    first of all take a look at this static html
                                    http://www.lootah.com/arabictutor/4english/sentences/s01.htm this is the wanted format.

                                    i've gone throug many alternateing scripts, unfortunatlly, i couldnt find that match my requirement.

                                    what im tryin to present the result in something like this


                                    |catid:1 |catid:2 |catid:3 |
                                    |catnm |catnm |catnm |
                                    |imgpath|imgpath|imgpath|


                                    |catid:4 |catid:5 |catid:6 |
                                    |catnm |catnm |catnm |
                                    |imgpath|imgpath|imgpath|


                                    |catid:7 |catid:8 |catid:9 |
                                    |catnm |catnm |catnm |
                                    |imgpath|imgpath|imgpath|

                                    and so on

                                    with the below script im able to get something like this:-

                                    |catid:1 |catid:2 |catid:3 |
                                    |catid:4 |catid:5 |catid:6 |
                                    |catid:7 |catid:8 |catid:9 |

                                    <table border="0" width="100%">
                                    <tr>
                                    <?
                                    $rw = 3;//number of columns per row
                                    $cnt = 0;
                                    while ($result=mysql_fetch_array($query))
                                    {
                                        $cnt = $cnt + 1;
                                        # Your results layout goes here
                                    	$catid=$result[0];//cat Id
                                    	$catprntid=$result[1];//parent id
                                    	$catnm=$result[2];//name
                                    	$cattitle=$result[3];//title
                                    	$imgpath=$result[4];//img src
                                    
                                    echo "<td vAlign=top align=middle bgColor=#dbdce9>
                                    <a href=alphabets.php?catprntid=$catid><img src=$imgpath></a></td>";
                                    
                                    if ( $cnt >= $rw ){
                                        print("</tr>");
                                        $cnt = 0;
                                    }
                                    }
                                    ?>
                                    </tr>
                                    </table>
                                    • thank you ...

                                      guess i have to approch d soulistion in nother way...

                                      thanks..