Activity Stream
48,167 MEMBERS
62151 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 5 of 5 FirstFirst ... 345
Results 41 to 44 of 44
  1.     
    #41
    Member
    Website's:
    heroturko.biz softpk.com gfxtra.biz hotfilegfx.com
    type is not show i am submit form but show Arry is not type name




    Please check checkbox

    Form Code:
    PHP Code: 
            <div class="toggle_container">
                            <
    div class="block">
                            
                            
                                <
    form enctype="multipart/form-data" action="add.php" method="POST">
                                    <
    center><b><h7>Vendor Service Request</h7></b></center>
                                    
                                    <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label class="hospitalname">Hospital Name</label>
                                                <
    div>
                                                    <
    input type="text" name="hospname" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Ref No.</label>
                                                <
    div>
                                                
                                                    <
    input type="text" name="refno" class="long">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                                    
                                     <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label>From</label>
                                                <
    div>
                                                    <
    input type="text" name="from" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Description</label>
                                                <
    div>
                                                
                                                    <
    input type="text" name="description" class="long">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                          
                                     <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label>Designation</label>
                                                <
    div>
                                                    <
    input type="text" name="designation" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Manufacture</label>
                                                <
    div>
                                                
                                                    <
    input type="text" name="manufacture" class="long">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                          
                                     <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label>Tel Number</label>
                                                <
    div>
                                                    <
    input type="text" name="telnumb" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Models</label>
                                                <
    div>
                                                
                                                    <
    input type="text" name="models" class="long">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                          
                                     <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label>Mobile Number</label>
                                                <
    div>
                                                    <
    input type="text" name="mobnumb" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Serial numbers</label>
                                                <
    div>
                                                
                                                    <
    input type="text" name="serialnumb" class="long">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                                    
                                     <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label>Fax</label>
                                                <
    div>
                                                    <
    input type="text" name="fax" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Equipment</label>
                                                <
    div>
                                                
                                                    <
    input type="text" name="equipment" class="long">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                          
                                     <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                                <
    label>Email address</label>
                                                <
    div>
                                                    <
    input type="text" name="emailadd" class="long">
                                                </
    div>
                                            </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label class="attachment">Attachement</label>
                                                <
    div>
                                                
                                                    <
    input type="file" id="fileupload2" name="attachement" class="uniform">
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                                    
                                    <
    div class="columns clearfix">
                                        
                                        <
    div class="col_50">
                                            <
    fieldset>
                                        
                                        <
    label>Type</label>
                                        <
    div class="uniform">
                                            <
    label for="yes">
                                                <
    input type="checkbox" name="type[]" value="AG" id="yes"/>
                                                
    Warranty
                                            
    </label>
                                            <
    label for="no">
                                                <
    input type="checkbox" name="type[]" value="GE" id="no"/>
                                                
    PPM Contact
                                            
    </label>
                                            <
    label for="cant">
                                                <
    input type="checkbox" name="type[]" value="BR" id="no"/>
                                                
    Repair argent
                                            
    </label>
                                        
                                    </
    fieldset>
                                        </
    div>
                                        
                                        <
    div class="col_50">
                                        
                                            <
    fieldset>
                                                
                                                <
    label>Fault Description And Service Description</label>
                                                <
    div>
                                                
                                                    <
    textarea height="50px" name="faultdsd" class="long"></textarea>
                                                
                                                </
    div>
                                                
                                            </
    fieldset>
                                        
                                        </
    div>
                                        
                                    </
    div>
                                    
                                                       
                                    <
    div class="padding_10">                                    
                                        
                                        <
    button type="submit" value="Add" class="button blue"> <img src="images/icons/white/png/checkmark_icon&16.png" /> Submit </button>
                                        <
    div class="clear"></div><!-- CLEAR BOTH -->
                                        
                                    </
    div>

                                </
    form>
                                
                            </
    div>
                            
                        </
    div>
                        
                    </
    div

    add.php
    PHP Code: 
     <?php 
     
     
    //This is the directory where images will be saved 
     
    $target "vendor-req-service/"
     
    $target $target basename$_FILES['attachement']['name']); 
     
     if(isset(
    $_POST['type']))
    {
    foreach(
    $_POST['type'] as $value) {
    $insert="INSERT INTO type (type) VALUES ('$value')";
    mysql_query($insert);
    }
    }
     
     
    //This gets all the other information from the form 
     
    $id=$_POST['ClientID']; 
     
    $hospname=$_POST['hospname']; 
     
    $refno=$_POST['refno']; 
     
    $from=$_POST['from']; 
     
    $description=$_POST['description']; 
     
    $designation=$_POST['designation']; 
     
    $manufacture=$_POST['manufacture']; 
     
    $telnumb=$_POST['telnumb']; 
     
    $models=$_POST['models']; 
     
    $mobnumb=$_POST['mobnumb']; 
     
    $serialnumb=$_POST['serialnumb']; 
     
    $fax=$_POST['fax']; 
     
    $equipment=$_POST['equipment']; 
     
    $emailadd=$_POST['emailadd'];
     
    $insert=$_POST['type']; 
     
    $faultdsd=$_POST['faultdsd']; 
     
    $pic=($_FILES['attachement']['name']);


     
     
     
    // Connects to your Database 
     
    mysql_connect("localhost""username""password") or die(mysql_error()) ; 
     
    mysql_select_db("my_db") or die(mysql_error()) ; 
     
     
    //Writes the information to the database 
     
    mysql_query("INSERT INTO `vendor` VALUES ('$id', '$hospname', '$refno', '$from', '$description', '$designation', '$manufacture', '$telnumb', '$models', '$mobnumb', '$serialnumb', '$fax', '$equipment', '$emailadd',  '$pic',  '$insert',  '$faultdsd')") ; 
     
     
    //Writes the photo to the server 
     
    if(move_uploaded_file($_FILES['attachement']['tmp_name'], $target)) 
     { 
     
     
    //Tells you if its all ok 
     
    echo "The file "basename$_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"
     } 
     else { 
     
     
    //Gives and error if its not 
     
    echo "Sorry, there was a problem uploading your file."
     } 
     
    ?>

  2.     
    #42
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Replace
    PHP Code: 
    <label for="yes">
                                                <
    input type="checkbox" name="type[]" value="AG" id="yes"/>
                                                
    Warranty
                                            
    </label>
                                            <
    label for="no">
                                                <
    input type="checkbox" name="type[]" value="GE" id="no"/>
                                                
    PPM Contact
                                            
    </label>
                                            <
    label for="cant">
                                                <
    input type="checkbox" name="type[]" value="BR" id="no"/>
                                                
    Repair argent
                                            
    </label
    With
    PHP Code: 
                                            <label for="yes">
                                                <
    input type="checkbox" name="type" value="Warranty" id="yes">
                                                
    Warranty
                                            
    </label>
                                            <
    label for="no">
                                                <
    input type="checkbox" name="type" value="PPM Contact" id="no"/>
                                                
    PPM Contact
                                            
    </label>
                                            <
    label for="cant">
                                                <
    input type="checkbox" name="type" value="Repair argent" id="cant"/>
                                                
    Repair argent
                                            
    </label
    Change the values according to your requirement.

    Edit: As for file download, replace in Full View Record Code:
    PHP Code: 
    print ("<label class='hospitalname'>{$a_row['attachement']}</label>" ); 
    With
    PHP Code: 
    print ("<label class='hospitalname'><a href=\"vendor-req-service/{$a_row['attachement']}\">{$a_row['attachement']}</a></label>" ); 
    You might need to change the absolute path according to your directory.

  3.     
    #43
    Member
    Website's:
    heroturko.biz softpk.com gfxtra.biz hotfilegfx.com
    show this error

    Warning: Invalid argument supplied for foreach() in G:\WampDeveloper\Websites\DefaultWebsite\webroot\t est4\add.php on line 9 The file has been uploaded, and your information has been added to the directory

    Line 9 is:
    PHP Code: 
    foreach($_POST['type'] as $value) { 
    add.php code:
    PHP Code: 
     <?php 
     
     
    //This is the directory where images will be saved 
     
    $target "vendor-req-service/"
     
    $target $target basename$_FILES['attachement']['name']); 
     
     if(isset(
    $_POST['type']))
    {
    foreach(
    $_POST['type'] as $value) {
    $insert="INSERT INTO type (type) VALUES ('$value')";
    mysql_query($insert);
    }
    }
     
     
    //This gets all the other information from the form 
     
    $id=$_POST['ClientID']; 
     
    $hospname=$_POST['hospname']; 
     
    $refno=$_POST['refno']; 
     
    $from=$_POST['from']; 
     
    $description=$_POST['description']; 
     
    $designation=$_POST['designation']; 
     
    $manufacture=$_POST['manufacture']; 
     
    $telnumb=$_POST['telnumb']; 
     
    $models=$_POST['models']; 
     
    $mobnumb=$_POST['mobnumb']; 
     
    $serialnumb=$_POST['serialnumb']; 
     
    $fax=$_POST['fax']; 
     
    $equipment=$_POST['equipment']; 
     
    $emailadd=$_POST['emailadd'];
     
    $insert=$_POST['type']; 
     
    $faultdsd=$_POST['faultdsd']; 
     
    $pic=($_FILES['attachement']['name']);


     
     
     
    // Connects to your Database 
     
    mysql_connect("localhost""zain""pimsat") or die(mysql_error()) ; 
     
    mysql_select_db("zain") or die(mysql_error()) ; 
     
     
    //Writes the information to the database 
     
    mysql_query("INSERT INTO `vendor` VALUES ('$id', '$hospname', '$refno', '$from', '$description', '$designation', '$manufacture', '$telnumb', '$models', '$mobnumb', '$serialnumb', '$fax', '$equipment', '$emailadd',  '$pic',  '$insert',  '$faultdsd')") ; 
     
     
    //Writes the photo to the server 
     
    if(move_uploaded_file($_FILES['attachement']['tmp_name'], $target)) 
     { 
     
     
    //Tells you if its all ok 
     
    echo "The file "basename$_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"
     } 
     else { 
     
     
    //Gives and error if its not 
     
    echo "Sorry, there was a problem uploading your file."
     } 
     
    ?>

  4.     
    #44
    Respected Member
    change
    PHP Code: 
    if(isset($_POST['type'])) 
    to
    PHP Code: 
    if(is_array($_POST['type'])) 
    If it doesn't show anything $_POST['type'] is not an array used in a foreach....

  5.   Sponsored Links

Page 5 of 5 FirstFirst ... 345

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Selling] Excellent Matrimonial Script| Complete readymade Matrimony Script Available
    By matriscript4u in forum Marketplace (Buy, Sell and Trade)
    Replies: 0
    Last Post: 23rd Oct 2012, 02:54 PM
  2. Replies: 12
    Last Post: 13th Mar 2012, 02:23 PM
  3. Greasemonkey script: Megaupload Premium Multifetch Script
    By Dman in forum Webmaster Resources
    Replies: 46
    Last Post: 15th Dec 2011, 01:07 AM
  4. [Selling] Rslinkgens Premium link generator script V1 -Most advanced and viral script
    By vccshopper in forum Completed Transactions
    Replies: 0
    Last Post: 24th Jun 2011, 08:10 PM
  5. [Selling] A.A.S. (Adult Automated Script For ClipBucket Video Script)
    By tangi in forum Completed Transactions
    Replies: 0
    Last Post: 25th Mar 2011, 12:45 PM

Tags for this Thread

BE SOCIAL